diff --git a/examples/drag-and-drop/drag-and-drop-1.rkt b/examples/drag-and-drop/drag-and-drop-1.rkt new file mode 100644 index 0000000..5fd6f0a --- /dev/null +++ b/examples/drag-and-drop/drag-and-drop-1.rkt @@ -0,0 +1,14 @@ +#lang planet dyoo/whalesong + +(require (planet dyoo/whalesong/web-world)) + +;; A small drag-and-drop example using the web-world library. +;; +;; The world consists of a set of boxes. +;; +;; A box has an id and a position. + +(define-struct world (boxes)) +(define-struct box (id x y)) + + diff --git a/examples/drag-and-drop/style.css b/examples/drag-and-drop/style.css new file mode 100644 index 0000000..fceb373 --- /dev/null +++ b/examples/drag-and-drop/style.css @@ -0,0 +1,17 @@ +html { + width: 100%; + height: 100%; +} + +body { + width: 100%; + height: 100%; +} + +#playground { + background-color: lightgray; + border: 1px solid black; + width: 70%; + height: 70%; + display: block; +} \ No newline at end of file diff --git a/examples/drag-and-drop/view.html b/examples/drag-and-drop/view.html new file mode 100644 index 0000000..2771d5f --- /dev/null +++ b/examples/drag-and-drop/view.html @@ -0,0 +1,16 @@ + + +
+ + + +