diff --git a/sources/index.html b/sources/index.html
index 381bb9f..7960c86 100644
--- a/sources/index.html
+++ b/sources/index.html
@@ -12,7 +12,6 @@
-
diff --git a/sources/links/main.css b/sources/links/main.css
index 6d1ae53..cbeb3bb 100644
--- a/sources/links/main.css
+++ b/sources/links/main.css
@@ -6,7 +6,7 @@ canvas { cursor: none }
yu { display:block; }
#cursor { z-index:899; position: absolute; }
-#guide { z-index:810;position: absolute; display: none}
+#guide { z-index:810;position: absolute; transition: opacity 250ms; opacity: 0}
#above { z-index:800; position: absolute; }
#below { z-index:799; position: absolute; }
diff --git a/sources/scripts/core/cursor.js b/sources/scripts/core/cursor.js
index 575774f..197bff0 100644
--- a/sources/scripts/core/cursor.js
+++ b/sources/scripts/core/cursor.js
@@ -45,8 +45,7 @@ function Cursor(rune)
pos.x -= (ronin.frame.zoom.offset.x / ronin.frame.zoom.scale);
pos.y -= (ronin.frame.zoom.offset.y / ronin.frame.zoom.scale);
- var magnet_pos = ronin.magnet.filter({x:pos.x,y:pos.y});
- return magnet_pos;
+ return pos;
}
this.mouse_down = function(e)
diff --git a/sources/scripts/layers/guide.js b/sources/scripts/layers/guide.js
index 0ea807f..5e1cb0a 100644
--- a/sources/scripts/layers/guide.js
+++ b/sources/scripts/layers/guide.js
@@ -3,17 +3,12 @@ function Guide()
Layer.call(this);
this.el.id = "guide";
- this.inspect = false;
+ this.inspect = true;
this.update = function()
{
this.clear();
- this.el.width = window.innerWidth * 2;
- this.el.height = window.innerHeight * 2;
- this.el.style.width = (window.innerWidth)+"px";
- this.el.style.height = (window.innerHeight)+"px";
-
var units = this.find_units();
if(this.inspect){
@@ -38,6 +33,11 @@ function Guide()
}
}
+ this.toggle = function()
+ {
+ this.el.style.opacity = this.el.style.opacity == 0 ? 1 : 0
+ }
+
this.toggle_color_picker = function(show)
{
if(!show){ return; }
@@ -105,7 +105,7 @@ function Guide()
ctx.moveTo(u1.x * 2,u1.y * 2);
ctx.lineTo(u2.x * 2,u2.y * 2);
ctx.lineCap="round";
- ctx.lineWidth = 2;
+ ctx.lineWidth = 0.5;
ctx.strokeStyle = color;
ctx.stroke();
ctx.closePath();
@@ -159,15 +159,16 @@ function Guide()
this.draw_inspector = function()
{
- this.draw_line({x:ronin.frame.width/2,y:0},{x:ronin.frame.width/2,y:ronin.frame.height},"red");
- this.draw_line({x:0,y:ronin.frame.height/2},{x:ronin.frame.width,y:ronin.frame.height/2},"red");
+ var color = "black"
+
+ this.draw_line({x:ronin.frame.width/2,y:0},{x:ronin.frame.width/2,y:ronin.frame.height},color);
+ this.draw_line({x:0,y:ronin.frame.height/2},{x:ronin.frame.width,y:ronin.frame.height/2},color);
var ctx = this.context();
var w = ronin.frame.width * 2;
var h = ronin.frame.height * 2;
- var angle = parseInt(ronin.commander.query().methods.inspect) > 0 ? parseInt(ronin.commander.query().methods.inspect) : 0;
- var color = "red"
+ var angle = 45;
ctx.translate(w/2,h/2);
diff --git a/sources/scripts/ronin.js b/sources/scripts/ronin.js
index fbee812..8093e0d 100644
--- a/sources/scripts/ronin.js
+++ b/sources/scripts/ronin.js
@@ -19,7 +19,6 @@ function Ronin()
this.brush = new Brush();
this.frame = new Frame();
this.path = new Path();
- this.magnet = new Magnet();
this.filter = new Filter();
this.type = new Type();
@@ -28,6 +27,7 @@ function Ronin()
above : this.above,
below : this.below,
cursor : this.cursor,
+ guide : this.guide,
};
this.modules = {
@@ -35,7 +35,6 @@ function Ronin()
frame : this.frame,
io : this.io,
path : this.path,
- magnet : this.magnet,
filter : this.filter,
type : this.type
};
@@ -56,6 +55,9 @@ function Ronin()
this.above.install();
this.below.install();
this.cursor.install();
+ this.guide.install();
+
+ this.guide.update();
this.hint.install();
@@ -94,6 +96,7 @@ function Ronin()
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 4x",() => { ronin.frame.methods.zoom.run(4); },"3");
+ this.controller.add("default","View","Toggle Guide",() => { ronin.guide.toggle(); },"h");
this.controller.commit();