Saturday, March 31, 2018

Drag and Drop

I' m such a goose. decided to have a look at html drag n' drop.
Had an example with text, and wanted to use a ball instead, to change things up.
After trying upteen new ways of wording commands to substitute 'img' for 'text" ( and
what does this turn 'data' into, finally got it. Everything works just fine being called
text even of it is an image. Goose, I tell you!






Code from W3 Schools

Highlights of the code: this is new to Html5. "Event" is recognized and various stages
of the drag operation: ondragstart, ondragend, ondragover. There has
to be somewhere in the code an event.preventDefault() to override
the browser's default behavior, which is to not allow drops.

As well, things need to be identified as draggable (This is the dragtarget).

Need to dig more into the data issue...

                                             *     *     *
I've found an effortless way to get images on a transparent background by
running these through Paint 3D, and letting that program remove the white.
Below, the steps:
1- the candidate image

2-screen grab
 3-import to Paint 3D
 4-run it through magic selector
 5-adjust to image I want
6-copy that to the clipboard
7-paste on a small artboard in Expression Blend
 8-check the export image
 9-make adjustments to the artboard
 10-success!

No comments: