summaryrefslogtreecommitdiff
path: root/js/ui/selection.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-12-09 16:15:37 -0500
committerJules Laplace <jules@okfoc.us>2014-12-09 16:15:37 -0500
commitda3b3feedfe3a928dec6ac615579538a9ab5b582 (patch)
tree2b176b394b301e2d633372d70f6bc8743e317feb /js/ui/selection.js
parent6a16ad9c408fb84dd27c618312f3111563ca2ad5 (diff)
less-destructive resize; stub out selection
Diffstat (limited to 'js/ui/selection.js')
-rw-r--r--js/ui/selection.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/js/ui/selection.js b/js/ui/selection.js
new file mode 100644
index 0000000..cbeb051
--- /dev/null
+++ b/js/ui/selection.js
@@ -0,0 +1,21 @@
+var selection = (function(){
+
+ var selection = new Matrix (1, 1, function(x,y){
+ var lex = new Lex (x,y)
+ lex.build()
+ return lex
+ })
+
+ // in selection mode..
+ // - we start by clicking the canvas. this positions the selection, and copies
+ // the character
+ // - then we drag down and to the right. this resizes the selection and pushes new
+ // rows and columns. each of these copies the character underneath.
+ // - on mouseup, the selection is locked. then..
+ // - drag the selection to move it -- this "cuts" it and leaves a blank space on the canvas.
+ // - shift-drag the selection to copy it
+
+
+ return selection
+
+})()