From fdfe34ded306526bd87568e50ac9a6e03c9c0594 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 26 Dec 2016 21:23:55 -0800 Subject: 3715 Fix cross-links in html for the edit/ app. I originally thought I'd need to provide a commandline flag like --rel-path or something. But we need to support different relative paths in a single html file. So the solution instead is appropriately engineering the tags file. --- html/edit/007-sandbox-delete.mu.html | 80 ++++++++++++++++++------------------ 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'html/edit/007-sandbox-delete.mu.html') diff --git a/html/edit/007-sandbox-delete.mu.html b/html/edit/007-sandbox-delete.mu.html index 620fc495..b2c9dcd5 100644 --- a/html/edit/007-sandbox-delete.mu.html +++ b/html/edit/007-sandbox-delete.mu.html @@ -64,7 +64,7 @@ if ('onhashchange' in window) { 6 assume-screen 100/width, 15/height 7 assume-resources [ 8 ] - 9 env:&:environment <- new-programming-environment resources, screen, [] + 9 env:&:environment <- new-programming-environment resources, screen, [] 10 # run a few commands 11 assume-console [ 12 left-click 1, 80 @@ -73,7 +73,7 @@ if ('onhashchange' in window) { 15 type [add 2, 2] 16 press F4 17 ] - 18 event-loop screen, console, env, resources + 18 event-loop screen, console, env, resources 19 screen-should-contain [ 20 . run (F4) . 21 . ╎ . @@ -94,7 +94,7 @@ if ('onhashchange' in window) { 36 left-click 7, 85 37 ] 38 run [ - 39 event-loop screen, console, env, resources + 39 event-loop screen, console, env, resources 40 ] 41 screen-should-contain [ 42 . run (F4) . @@ -112,7 +112,7 @@ if ('onhashchange' in window) { 54 left-click 3, 99 55 ] 56 run [ - 57 event-loop screen, console, env, resources + 57 event-loop screen, console, env, resources 58 ] 59 screen-should-contain [ 60 . run (F4) . @@ -126,45 +126,45 @@ if ('onhashchange' in window) { 68 after <global-touch> [ 69 # support 'delete' button 70 { - 71 delete?:bool <- should-attempt-delete? click-row, click-column, env + 71 delete?:bool <- should-attempt-delete? click-row, click-column, env 72 break-unless delete? - 73 delete?, env <- try-delete-sandbox click-row, env + 73 delete?, env <- try-delete-sandbox click-row, env 74 break-unless delete? - 75 hide-screen screen - 76 screen <- render-sandbox-side screen, env, render - 77 screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env - 78 show-screen screen + 75 hide-screen screen + 76 screen <- render-sandbox-side screen, env, render + 77 screen <- update-cursor screen, recipes, current-sandbox, sandbox-in-focus?, env + 78 show-screen screen 79 loop +next-event 80 } 81 ] 82 83 # some preconditions for attempting to delete a sandbox - 84 def should-attempt-delete? click-row:num, click-column:num, env:&:environment -> result:bool [ + 84 def should-attempt-delete? click-row:num, click-column:num, env:&:environment -> result:bool [ 85 local-scope 86 load-ingredients 87 # are we below the sandbox editor? - 88 click-sandbox-area?:bool <- click-on-sandbox-area? click-row, click-column, env + 88 click-sandbox-area?:bool <- click-on-sandbox-area? click-row, click-column, env 89 return-unless click-sandbox-area?, 0/false 90 # narrower, is the click in the columns spanning the 'copy' button? 91 first-sandbox:&:editor <- get *env, current-sandbox:offset 92 assert first-sandbox, [!!] 93 sandbox-left-margin:num <- get *first-sandbox, left:offset 94 sandbox-right-margin:num <- get *first-sandbox, right:offset - 95 _, _, _, _, delete-button-left:num <- sandbox-menu-columns sandbox-left-margin, sandbox-right-margin - 96 result <- within-range? click-column, delete-button-left, sandbox-right-margin + 95 _, _, _, _, delete-button-left:num <- sandbox-menu-columns sandbox-left-margin, sandbox-right-margin + 96 result <- within-range? click-column, delete-button-left, sandbox-right-margin 97 ] 98 - 99 def try-delete-sandbox click-row:num, env:&:environment -> clicked-on-delete-button?:bool, env:&:environment [ + 99 def try-delete-sandbox click-row:num, env:&:environment -> clicked-on-delete-button?:bool, env:&:environment [ 100 local-scope 101 load-ingredients 102 # identify the sandbox to delete, if the click was actually on the 'delete' button -103 sandbox:&:sandbox <- find-sandbox env, click-row +103 sandbox:&:sandbox <- find-sandbox env, click-row 104 return-unless sandbox, 0/false 105 clicked-on-delete-button? <- copy 1/true -106 env <- delete-sandbox env, sandbox +106 env <- delete-sandbox env, sandbox 107 ] 108 -109 def delete-sandbox env:&:environment, sandbox:&:sandbox -> env:&:environment [ +109 def delete-sandbox env:&:environment, sandbox:&:sandbox -> env:&:environment [ 110 local-scope 111 load-ingredients 112 curr-sandbox:&:sandbox <- get *env, sandbox:offset @@ -213,8 +213,8 @@ if ('onhashchange' in window) { 155 # initialize environment 156 assume-resources [ 157 ] -158 env:&:environment <- new-programming-environment resources, screen, [] -159 render-all screen, env, render +158 env:&:environment <- new-programming-environment resources, screen, [] +159 render-all screen, env, render 160 # create 2 sandboxes and scroll to second 161 assume-console [ 162 press ctrl-n @@ -222,9 +222,9 @@ if ('onhashchange' in window) { 164 press F4 165 type [add 1, 1] 166 press F4 -167 press page-down +167 press page-down 168 ] -169 event-loop screen, console, env, resources +169 event-loop screen, console, env, resources 170 screen-should-contain [ 171 . run (F4) . 172 . ╎─────────────────────────────────────────────────. @@ -239,7 +239,7 @@ if ('onhashchange' in window) { 181 left-click 6, 99 182 ] 183 run [ -184 event-loop screen, console, env, resources +184 event-loop screen, console, env, resources 185 ] 186 # second sandbox shows in editor; scroll resets to display first sandbox 187 screen-should-contain [ @@ -260,8 +260,8 @@ if ('onhashchange' in window) { 202 # initialize environment 203 assume-resources [ 204 ] -205 env:&:environment <- new-programming-environment resources, screen, [] -206 render-all screen, env, render +205 env:&:environment <- new-programming-environment resources, screen, [] +206 render-all screen, env, render 207 # create 2 sandboxes and scroll to second 208 assume-console [ 209 press ctrl-n @@ -269,9 +269,9 @@ if ('onhashchange' in window) { 211 press F4 212 type [add 1, 1] 213 press F4 -214 press page-down +214 press page-down 215 ] -216 event-loop screen, console, env, resources +216 event-loop screen, console, env, resources 217 screen-should-contain [ 218 . run (F4) . 219 . ╎─────────────────────────────────────────────────. @@ -286,7 +286,7 @@ if ('onhashchange' in window) { 228 left-click 2, 99 229 ] 230 run [ -231 event-loop screen, console, env, resources +231 event-loop screen, console, env, resources 232 ] 233 # second sandbox shows in editor; scroll resets to display first sandbox 234 screen-should-contain [ @@ -307,8 +307,8 @@ if ('onhashchange' in window) { 249 # initialize environment 250 assume-resources [ 251 ] -252 env:&:environment <- new-programming-environment resources, screen, [] -253 render-all screen, env, render +252 env:&:environment <- new-programming-environment resources, screen, [] +253 render-all screen, env, render 254 # create 2 sandboxes and scroll to second 255 assume-console [ 256 press ctrl-n @@ -316,10 +316,10 @@ if ('onhashchange' in window) { 258 press F4 259 type [add 1, 1] 260 press F4 -261 press page-down -262 press page-down +261 press page-down +262 press page-down 263 ] -264 event-loop screen, console, env, resources +264 event-loop screen, console, env, resources 265 screen-should-contain [ 266 . run (F4) . 267 . ╎─────────────────────────────────────────────────. @@ -334,7 +334,7 @@ if ('onhashchange' in window) { 276 left-click 2, 99 277 ] 278 run [ -279 event-loop screen, console, env, resources +279 event-loop screen, console, env, resources 280 ] 281 # implicitly scroll up to first sandbox 282 screen-should-contain [ @@ -356,8 +356,8 @@ if ('onhashchange' in window) { 298 # initialize environment 299 assume-resources [ 300 ] -301 env:&:environment <- new-programming-environment resources, screen, [] -302 render-all screen, env, render +301 env:&:environment <- new-programming-environment resources, screen, [] +302 render-all screen, env, render 303 # create 2 sandboxes 304 assume-console [ 305 press ctrl-n @@ -366,7 +366,7 @@ if ('onhashchange' in window) { 308 type [add 1, 1] 309 press F4 310 ] -311 event-loop screen, console, env, resources +311 event-loop screen, console, env, resources 312 screen-should-contain [ 313 . run (F4) . 314 . ╎ . @@ -382,11 +382,11 @@ if ('onhashchange' in window) { 324 # delete the second sandbox, then try to scroll down twice 325 assume-console [ 326 left-click 3, 99 -327 press page-down -328 press page-down +327 press page-down +328 press page-down 329 ] 330 run [ -331 event-loop screen, console, env, resources +331 event-loop screen, console, env, resources 332 ] 333 # shouldn't go past last sandbox 334 screen-should-contain [ -- cgit 1.4.1-2-gfad0