summaryrefslogtreecommitdiff
path: root/js/undo.js
diff options
context:
space:
mode:
authortimb <opuscule@gmail.com>2015-07-22 01:00:25 -0700
committertimb <opuscule@gmail.com>2015-07-22 01:00:25 -0700
commit563fc38f05854ae2ef24499f89017b993084a7cb (patch)
tree1c7a7463e4b6b69c150f7f979f12112448105925 /js/undo.js
parentff9c8b35f2e878ac4ab0a89079b5d25d44d9de9b (diff)
tiny bit of cleanup
Diffstat (limited to 'js/undo.js')
-rw-r--r--js/undo.js8
1 files changed, 2 insertions, 6 deletions
diff --git a/js/undo.js b/js/undo.js
index cc7f2a5..436422f 100644
--- a/js/undo.js
+++ b/js/undo.js
@@ -82,13 +82,10 @@ var save_rect = function(xpos, ypos, w, h, state){
state = state || current_undo;
state.rects = state.rects || []
var aa = canvas.aa;
-
var rect = {x: xpos, y: ypos, w: w, h: h, lexs: []}
var lexs = rect.lexs
-
var xlen = xpos + w
var ylen = ypos + h
-
for (var y = ypos; y < ylen; y++){
var aay = aa[y]
for (var x = xpos; x < xlen; x++){
@@ -125,7 +122,7 @@ var restore_state = function(state){
// if it doesn't have one, generate one
var make_redo = ! ('redo' in state || 'undo' in state);
var aa = canvas.aa
- var lex, lexs; // = state.lexs
+ var lex, lexs;
if (make_redo){
state.redo = new_redo()
@@ -173,10 +170,9 @@ var restore_state = function(state){
if ('focus' in state){
canvas.focus_x = state.focus.x
canvas.focus_y = state.focus.y
- if (current_canvas === canvas){ // &&)
+ if (current_canvas === canvas){
canvas.focus()
}
- // if (focused_input === canvas) canvas.focus()
}
}