Draw the cursor at the right place.
This commit is contained in:
parent
a4e59a4a5b
commit
7693356826
@ -72,18 +72,10 @@ function Cursor(rune)
|
|||||||
// Save original query
|
// Save original query
|
||||||
ronin.cursor.query = ronin.commander.input_el.value;
|
ronin.cursor.query = ronin.commander.input_el.value;
|
||||||
|
|
||||||
if(ronin.commander.active_module()){
|
if(ronin.commander.active_module()){ }
|
||||||
|
else if(e.altKey && e.shiftKey){ ronin.brush.methods.pick.run(pos); }
|
||||||
}
|
else if(e.shiftKey){ }
|
||||||
else if(e.altKey && e.shiftKey){
|
else{ ronin.brush.stroke(ronin.cursor.line); }
|
||||||
ronin.brush.methods.pick.run(pos);
|
|
||||||
}
|
|
||||||
else if(e.shiftKey){
|
|
||||||
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
ronin.brush.stroke(ronin.cursor.line);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(e.shiftKey){ ronin.cursor.mode = "rect"; }
|
if(e.shiftKey){ ronin.cursor.mode = "rect"; }
|
||||||
if(e.altKey){ ronin.cursor.mode = "arc_to"; }
|
if(e.altKey){ ronin.cursor.mode = "arc_to"; }
|
||||||
@ -96,25 +88,16 @@ function Cursor(rune)
|
|||||||
|
|
||||||
var pos = ronin.cursor.mouse_pos(e);
|
var pos = ronin.cursor.mouse_pos(e);
|
||||||
ronin.cursor.pos = pos;
|
ronin.cursor.pos = pos;
|
||||||
|
ronin.cursor.draw_cursor({x:pos.x,y:pos.y});
|
||||||
ronin.cursor.draw_cursor({x:e.clientX,y:e.clientY});
|
|
||||||
|
|
||||||
if(!ronin.cursor.line.from){ return; }
|
if(!ronin.cursor.line.from){ return; }
|
||||||
|
|
||||||
ronin.cursor.line.to = {x:pos.x,y:pos.y};
|
ronin.cursor.line.to = {x:pos.x,y:pos.y};
|
||||||
|
|
||||||
if(ronin.commander.active_module()){
|
if(ronin.commander.active_module()){ }
|
||||||
|
else if(e.altKey && e.shiftKey){ ronin.brush.methods.pick.run(pos); }
|
||||||
}
|
else if(e.shiftKey){ ronin.cursor.drag(ronin.cursor.line); }
|
||||||
else if(e.altKey && e.shiftKey){
|
else{ ronin.brush.stroke(ronin.cursor.line); }
|
||||||
ronin.brush.methods.pick.run(pos);
|
|
||||||
}
|
|
||||||
else if(e.shiftKey){
|
|
||||||
ronin.cursor.drag(ronin.cursor.line);
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
ronin.brush.stroke(ronin.cursor.line);
|
|
||||||
}
|
|
||||||
|
|
||||||
ronin.cursor.inject_query();
|
ronin.cursor.inject_query();
|
||||||
|
|
||||||
@ -127,8 +110,7 @@ function Cursor(rune)
|
|||||||
|
|
||||||
var pos = ronin.cursor.mouse_pos(e);
|
var pos = ronin.cursor.mouse_pos(e);
|
||||||
ronin.cursor.pos = pos;
|
ronin.cursor.pos = pos;
|
||||||
|
ronin.cursor.draw_cursor({x:pos.x,y:pos.y});
|
||||||
ronin.cursor.draw_cursor({x:e.clientX,y:e.clientY},true);
|
|
||||||
|
|
||||||
ronin.cursor.line.destination = {x:pos.x,y:pos.y};
|
ronin.cursor.line.destination = {x:pos.x,y:pos.y};
|
||||||
|
|
||||||
|
@ -84,6 +84,8 @@ function Ronin()
|
|||||||
this.controller.add("default","Brush","Dec Size",() => { ronin.brush.mod_size(-1); },"[");
|
this.controller.add("default","Brush","Dec Size",() => { ronin.brush.mod_size(-1); },"[");
|
||||||
this.controller.add("default","Brush","Toggle Color",() => { ronin.cursor.swap_colors(); },"x");
|
this.controller.add("default","Brush","Toggle Color",() => { ronin.cursor.swap_colors(); },"x");
|
||||||
|
|
||||||
|
this.controller.add("default","Commander","Fill With $",() => { ronin.commander.inject("fill:$"); },"CmdOrCtrl+F");
|
||||||
|
|
||||||
this.controller.add("default","View","Zoom Reset",() => { ronin.frame.methods.zoom.run(1); },"1");
|
this.controller.add("default","View","Zoom Reset",() => { ronin.frame.methods.zoom.run(1); },"1");
|
||||||
this.controller.add("default","View","Zoom 2x",() => { ronin.frame.methods.zoom.run(2); },"2");
|
this.controller.add("default","View","Zoom 2x",() => { ronin.frame.methods.zoom.run(2); },"2");
|
||||||
this.controller.add("default","View","Zoom 4x",() => { ronin.frame.methods.zoom.run(4); },"3");
|
this.controller.add("default","View","Zoom 4x",() => { ronin.frame.methods.zoom.run(4); },"3");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user