From fcb07257f0208612816c888b7b6f9b8ac4c4570e Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 5 Jun 2022 22:31:03 -0500 Subject: add draggable 'windows' --- src/main.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index 7e4ab79..5158cf3 100644 --- a/src/main.js +++ b/src/main.js @@ -1,7 +1,8 @@ +import h from './Util/DomUtil.js'; import { Transform, Canvas } from './Map/Canvas.js'; import { Node, Shape, Point, Path, Polygon, Text } from './Map/Shapes.js'; - -function point(x, y) { this.x = x; this.y = y; }; +import { LayerData, LayerView, LayerController } from './Map/Layer.js'; +import DraggableWindow from './Draggable/Draggable.js'; const canvas = new Canvas('root'); const transform = new Transform(); @@ -22,3 +23,9 @@ const shapes = [ ]; canvas.render(transform, shapes); + + +const win = new DraggableWindow('Layers'); +const layerView = new LayerView(win.div); +const layerData = new LayerData(); +const layerController = new LayerController(layerData, layerView); -- cgit v1.2.1