From c34ad13b8e9d4a162ba702a5be129c7e280fe220 Mon Sep 17 00:00:00 2001 From: pepper Date: Sat, 14 Feb 2015 11:41:48 -0800 Subject: added a few things --- sketch.html | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sketch.html b/sketch.html index 18baf33..aa5f5de 100644 --- a/sketch.html +++ b/sketch.html @@ -5,6 +5,12 @@ #canvas_wrapper{ // position:absolute; display: inline-block; +white-space: pre-wrap; +word-wrap: break-word; +-webkit-user-select: none; +-moz-user-select: none; +user-select: none; +// pointer-events: none; } .canvas_cell{ border: 1px solid black; @@ -88,5 +94,55 @@ $(document).ready(function(){ c.initialize($("#cols").val(), $("#rows").val()); }); +//var isDragging = false; +//$("a") +//.mousedown(function() { +// $(window).mousemove(function() { +// isDragging = true; +// $(window).unbind("mousemove"); +// }); +//}) +//.mouseup(function() { +// var wasDragging = isDragging; +// isDragging = false; +// $(window).unbind("mousemove"); +// if (!wasDragging) { //was clicking +// $("#throbble").show(); +// } +//}); +// lex.span.addEventListener('mousedown', function(e){ +// e.preventDefault() +// dragging = true +// current_canvas = canvas +// if (drawing) { +// draw.down(e, lex, point) +// } +// else if (selecting) { +// selection.down(e, lex, point) +// } +// else if (filling) { +// draw.fill(brush, x, y) +// } +// lex.focus() +// }) +// lex.span.addEventListener("mousemove", function(e){ +// if (! dragging) return +// if (drawing) { +// draw.move(e, lex, point) +// } +// else if (selecting) { +// selection.move(e, lex, point) +// } +// lex.focus() +// }) +// +// }) +// } +// +// return exports +// +//})() + + -- cgit v1.2.3-70-g09d2