From 450aee4f723f20a3e7eead5f20e8b03cdbe5ff6b Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 25 Jan 2017 15:30:07 -0700 Subject: [PATCH] Multi strokes --- scripts/core/cursor.js | 4 ++-- scripts/modules/vector.js | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/core/cursor.js b/scripts/core/cursor.js index 357ecad..af2b2bb 100644 --- a/scripts/core/cursor.js +++ b/scripts/core/cursor.js @@ -117,8 +117,8 @@ function Cursor(rune) this.element.style.width = radius; this.element.style.height = radius; this.element.style.borderRadius = radius; - this.element.style.marginLeft = -radius/2; - this.element.style.marginTop = -radius/2; + this.element.style.marginLeft = -(radius/2)-1; + this.element.style.marginTop = -(radius/2)-1; this.element.style.borderColor = this.mode && this.mode.color ? this.mode.color.hex : "#ff0000"; } diff --git a/scripts/modules/vector.js b/scripts/modules/vector.js index 80924ca..4cac6d9 100644 --- a/scripts/modules/vector.js +++ b/scripts/modules/vector.js @@ -42,7 +42,10 @@ function Vector(rune) this.widget_cursor = function() { - if(keyboard.shift_held == true){ + if(keyboard.shift_held == true && keyboard.alt_held == true){ + return "Vector(Origin)"; + } + else if(keyboard.shift_held == true){ return "Vector(Counterclock Arc)"; } else if(keyboard.alt_held == true){ @@ -86,7 +89,10 @@ function Vector(rune) this.click = null; // Add the right thing - if(keyboard.shift_held == true){ + if(keyboard.shift_held == true && keyboard.alt_held == true){ + this.coordinates.push("M"+position.render()); + } + else if(keyboard.shift_held == true){ this.coordinates.push("A1,1 0 0,1 "+position.render()); } else if(keyboard.alt_held == true){