Skip to content

Commit

Permalink
Update morphic.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoenig committed Aug 3, 2022
1 parent 2e1db15 commit 066f328
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions morphic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
written by Jens Mönig
jens@moenig.org

Copyright (C) 2010-2020 by Jens Mönig
Copyright (C) 2010-2022 by Jens Mönig

This documentation last changed: July 22, 2020
This documentation last changed: August 03, 2022

This file is part of Snap!.

Expand Down Expand Up @@ -643,7 +643,7 @@

Drops of image elements from outside the world canvas are dispatched as

droppedImage(aCanvas, name)
droppedImage(aCanvas, name, embeddedData)
droppedSVG(anImage, name)

events to interested Morphs at the mouse pointer. If you want your Morph
Expand All @@ -664,8 +664,22 @@
droppedImage() event with a canvas containing a rasterized version of the
SVG.

The same applies to drops of audio or text files from outside the world
canvas.
Note that PNG images provide for embedded text comments, which can be used
to include code or arbitrary data such as a CSV, JSON or XML file inside
the image. Such a payload has to be identified by an agreed-upon marker.
The default tag is stored in MorphicPreferences and can be overriden by
apps wishing to make use of this feature. If such an embedded text-payload
is found inside a PNG it is passed as the optional third "embeddedData"
parameter to the "droppedImage()" event. embedded text only applies to PNGs.
You can embed a string into the PNG metadata of a PNG by calling

embedMetadataPNG(aCanvas, aString)

with a raster image represented by a canvas and a string that is to be
embedded into the PNG's metadata.

The same event mechanism applies to drops of audio or text files from
outside the world canvas.

Those are dispatched as

Expand All @@ -679,6 +693,15 @@

droppedBinary(anArrayBuffer, name)

In case multiple files are dropped simulateneously the events

beginBulkDrop()
endBulkDrop()

are dispatched to to Morphs interested in bracketing the bulk operation,
and the endBulkDrop() event is only signalled after the contents last file
has been asynchronously made available.


(e) keyboard events
-------------------
Expand Down Expand Up @@ -1268,10 +1291,12 @@
Jason N (@cyderize) contributed native copy & paste for text editing.
Bartosz Leper contributed retina display support.
Zhenlei Jia and Dariusz Dorożalski pioneered IME text editing.
Dariusz Dorożalski and Jesus Villalobos contributed embedding blocks
into image metadata.
Bernat Romagosa contributed to text editing and to the core design.
Michael Ball found and fixed a longstanding scrolling bug.
Brian Harvey contributed to the design and implementation of submenus.
Ken Kahn contributed to Chinese keboard entry and Android support.
Brian Broll contributed clickable URLs in text elements.
Brian Broll contributed clickable URLs in text elements and many bugfixes.

- Jens Mönig

0 comments on commit 066f328

Please sign in to comment.