* master:
add pentrails->costume block to penTrails library
Add reporters to setrgb library
Update LEAP library to use menus
Hide setting for “prefer smooth animations”
Disabled hover-help for custom blocks
* 'master' of git://github.com/jmoenig/Snap--Build-Your-Own-Blocks:
Update Libraries from s.b.e
updated locale version data
updated version date
Disable JS-Functions to protect users from malicious scripts
Revert "SNAP! → Snap!"
Adapting Chinese code langs to ISO Standard
Fixing minor typo in catalan translation
Deleting duplicate translation strings
fix merge comments
minor typos
SNAP! → Snap!
blocks.js fix code alignment
camelCase expprtResultPic for consistency
Align comment text
Morphic: cleanup `nop` calls
Fix minor help text
* 'master' of git://github.com/jmoenig/Snap--Build-Your-Own-Blocks: (85 commits)
updated history
simplified reporterize>>blockFromAST
Fixing typo - tab control character hidden
Fixing ColorSlotMorphs behavior in Visible Stepping
added Boolean operators to “reporterize”
fixed a glitch in "reporterize"
fixed an expression parsing glitch
tweaked "reporterize"
reporterize: support '_' as empty slot place holder
reporterize: support for monads etc.
moved reporterizing infix expressions to search-blocks field
[experimental] blockify simple arithmetic expressions inside comments
new url option switch: &noExitWarning
updated history
Adding 26 extra strings
Adding extra strings from lang-pt.js
tweaked elastic easings
added easeOutElastic function
Updated with lang-de.js
added a few in-/out- only easing functions for animations
...
* auto-wrapping for C-shaped slots (around top-level command stacks)
* settings option for auto-wrapping around inner nested stacks
* unlimited “undrop / redrop”, incl. keyboard shortcuts ctrl-z
ctrl-shift-z
* “undrop” also brings back blocks and scripts deleted via context menus
* … or via backspace / delete in keyboard entry mode
* Note: “undrop” is meant to be a temporary solution until
VanderbiltEdu’s synching / undo mechanism is ready for prime time
also: treat JS-function blocks the same as variable getters wrt rings,
i.e. auto-remove the ring in a CALL block when dropping a JS-function
block on it
* Visible Stepping with flashing blocks + slider for stepping speed
* user-controlled visible stepping with “step forward” button
* speed-up: removed unnecessary yields when running custom blocks
* you can now force a single yield with “wait 0” block
* tweaked keyboard entry: if inserted block has inputs go to first one
* only autoscroll panes where it makes sense (not the palette etc.)
* populate messages drop-down with all msgs, including ones from custom
block definition
* fixes the FILL block on retina screens
* fixes turning pentrails into costumes on retina screens
* adds an option to the settings menu letting the user switch between
non-retina and retina resolutions on devices and in browsers that
support it
* Morphic documentation update for retina support
Again, folks, this is IN PROGRESS and not yet ready to be released. But
it’s getting closer to being testable :-)
This has bee designed and written by the amazing Bartosz Leper
(@bl-nero). Since I totally suck at Git and find myself incompetent to
resolve merge conflicts, I’ve decided to manually copy Bartosz’s
changes mostly verbatim over, tweaking them only ever so slightly in
ways that don’t alter their functionality, except for introducing a
tiny test so current Safari still loads Snap, albeit not in retina
mode. THIS IT NOT READY FOR RELEASE YET, IT’S WORK IN PROGRESS. Get it?
Thanks!
* make dialog resizable
* enable double-click on icons
* prevent error if no icon is selected
* prevent error if icon is dragged
* prevent error if icon is right-clicked / ctrl-clicked
* adjust background color
* adjust icon layout
This was removed due to instability on the part of browser vendors.
`Canvas.toBlob()` _should_ be the preferred way of exporting a canvas
as an image. Blob URIs are shorter and don't cause Chrome crashes like
the `data:` URI scheme does. They are also faster to encode images, and
don't clog up browser history.
**However**, there are currently issues in browser support which make
it hard to save images generated by blob URIs. Chrome and Firefox both
have different mechanisms of exporting blob images to disk. (In Chrome
you must right click the image, whereas in Firefox you must use the Save Page As command.)
The current solution is this:
* When a script pic is generated, create a large `data:` URI/
* Check if the browser is Chrome and if the length is a problem
* If so, convert the URI to a blob manually.
* Use the `a[download]` attribute to force the browser to save to disk.
Note that the conversion to a manual blob is _much_ slower than a
native method, but as this is an exporting operation it shouldn't cause
too much of a headache for users since it should be a fairly low
occurrence that users hit that code path.
* Minor: Fix the help text for downloading a project to the downloads
folder to be correct
* Add back the ability to export a project to a new tab by
shift-clicking on the File menu.
New string to be translated:
'save project data as XML\nto your downloads folder
* Show result bubble when the user clicks on a command script that uses
REPORT (You can now click on REPORT and it actually does something)
* New generic “When” hat block, enhances red stop button behavior
* New block (instance) variables feature (experimental)
* evaluator performance optimizations
* Morphic grab-threshold fix for scroll frames
* fixed several block rendering glitches
* List category LENGTH reporter now also works on text
* Changed “any” to “random” (in English only)
* new FILL primitive in the Pen category
* switched to animation frame scheduling, please use TURBO for music
* Updated German translation
* master:
add Brian's help panes for "for each item of list" block
optimize cloud communication
fixed linked lists identity loss when showing watchers
Add LABEL to the tools library; fix#1009
fixed a zebra-coloring glitch for BooleanSlotMorph
currently the expression isAutoFill || true will always evaluate
to true! :O
(That makes the argument somewhat useless though.) So, this fixes things...
* fixed occasional horizontal rendering artifacts in block “holes”
(C-shaped slots and Ring holes)
* improved user editing of input slots and fixed cursor behavior (note:
the text cursor inside input slots also blinks again, as it should have)
* always export comments attached to prototype hat blocks in the block
editor along with script pic
* when first opening a block editor on a custom block definition make
it big enough to show everything (as much as fits on the screen)
* remember block editor position and dimensions for each edited custom
block definition when acknowledging (pressing OK or APPLY) for the
session
* speed up stacking of commands and loading of projects by suppressing
redundant block redraws
* introducing a “grab threshold” preference to suppress accidental
grabbing through micro-movements of the hand. This addresses the
“cannot-click-on-drop-downs-in-Chrome-under-Windows” set of bug
reports, and also the issues that arise out of accidentally dragging
off a copy of a parameter blob when trying to just click on it to
rename it
* new hidden (shift-click) option to adjust the grab threshold in the
settings menu for the current session
* expand list watchers inside result bubbles and speech/thought
balloons to show everything (as much of the list’s first level as fist
into either the scripting area for result bubbles or the stage for
speech balloons - note resizing the stage affects the size of the list
watchers inside speech balloons, i.e. making the stage bigger increases
the number of visible elements even while the balloon is showing)
* fixed a bug that make an occasional gray rectangle appear at the
mouse pointer
* added a way to invoke blocks synchronously in JavaScript - under
construction (possibly to be used for generic “When” hat blocks and
user-customizable drop-downs)
* added methods to cache morphs’ fullImage and fullBounds while dragging
* Reporters (also nested reporters) and sprite icons (in the corral)
are now semi-transparent when being dragged, so you can see possible
drop target halos /through/ them
* in “prefer empty slot drops” mode (default) it is now much harder to
drop reporters onto non-static C-slots inside custom blocks (e.g. in
FOR loops) and onto variadic input arrowheads (to replace the whole
input with an input list)
* ScriptsMorphs are now noticing transparent clicks (addresses #997)
* %interaction slots are now static, fixed#982 (it is no longer
possible to drop reporters into the input slot of a “When I am…” hat
block (never was intended that it should be possible)
* fixed ctrl-f for the block editor in all situations (thanks, Brian,
for the bug report)
- added TODO comments to all functions that need updating (byob, blocks)
- separate out the code into 3 new functions for readability:
- `saveFileAs` is a generic method
- `saveCanvasAs` and `saveXMLAs` are wrappers which aid in exporting images and all XML files which together cover almost all export cases.
- In other cases, you can call `saveFileAs` directly with some additional input.
- `saveCanvasAs` in particular uses a new `Canvas.toBlob()` option when it is available (FF and IE currently) that should greatly reduce memory.
(Chrome and Safari both have open bugs and may at somepoint implement this function.)
- I have added in code to detect bugs in chrome, including when a new window is being opened. If a new window cannot be opened, the a (to be written) warning message will appear.
- a few functions (namely those in morphic.js) have not touched. However, these are functions which should only occur in a small subset of cases and are behind hidden features.
* BYOB, Objects, GUI: New “Remove Unused Global Blocks” Feature
* GUI, Lists: “Export Project Summary” improvements:
- show variable values as watcher pics
- expand list watcher pics to show their complete contents (1. level)
- url for shared projects
- table of contents
- basic support for sprite nesting and inheritance
- make the summary “browsable” instead of editable
- outline around sprite / stage snapshots
- experimental hidden (shift-click) “drop-shadows” option
* GUI: Rearrange project menu, only show global blocks-related ops if
there are any
* GUI: Remove URL location.hash information when loading a new project
* Store: Fix deserialization support for projects using inheritance
* German translation update