Added cursor modes.

This commit is contained in:
Devine Lu Linvega
2016-12-19 10:01:29 -07:00
parent 87881159af
commit 01e8b81fda
8 changed files with 36 additions and 59 deletions

View File

@@ -42,6 +42,7 @@ function Canvas(rune)
ronin.widget.element.style.left = (window.innerWidth/2)-(rect.width/2);
ronin.widget.element.style.top = (window.innerHeight/2)+(rect.height/2);
ronin.widget.element.style.width = rect.width+"px";
ronin.widget.update();

View File

@@ -101,33 +101,6 @@ function Overlay(rune)
this.context().closePath();
}
// Live Draw(Ctrl)
this.live_draw_from = null;
this.live_draw_start = function(e)
{
this.clear();
this.draw_pointer(ronin.position_in_canvas(e));
this.live_draw_from = ronin.position_in_canvas(e);
commander.show();
commander.element_input.focus();
commander.element_input.value = "| "+this.live_draw_from.render();
}
this.live_draw = function(e)
{
this.clear();
var rect = new Rect();
rect.width = ronin.position_in_canvas(e).x - this.live_draw_from.x;
rect.height = ronin.position_in_canvas(e).y - this.live_draw_from.y;
this.draw_rect(this.live_draw_from,rect);
commander.element_input.value = "| "+this.live_draw_from.render()+" "+rect.render();
}
this.resize = function(rect)
{
this.element.setAttribute('width',rect.width+"px");