Added typography tool

This commit is contained in:
Devine Lu Linvega
2016-12-25 20:43:51 -07:00
parent b50436cb27
commit 1c6a8b3c9b
4 changed files with 43 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ function Hint(element)
var s = "<span class='module'>Modules</span>";
for (var key in ronin.modules){
s += "<span class='param'>"+ronin.modules[key].constructor.name.substr(0,2)+"<span> <span class='value'>"+key+"</span> ";
s += "<span> <span class='value'>"+key+"</span> <span class='param'>"+ronin.modules[key].constructor.name.substr(0,2)+" ";
}
return s;

View File

@@ -16,6 +16,7 @@ function Ronin()
this.eraser = new Eraser(".");
this.surface = new Surface("#");
this.eye = new Eye("*");
this.typo = new Typographe("&");
this.cursor = new Cursor();
@@ -31,6 +32,7 @@ function Ronin()
this.modules[this.eraser.rune] = this.eraser;
this.modules[this.surface.rune] = this.surface;
this.modules[this.eye.rune] = this.eye;
this.modules[this.typo.rune] = this.typo;
this.cursors = [];
@@ -47,7 +49,6 @@ function Ronin()
this.position_in_window = function(p)
{
console.log(p.x);
return new Position(p.x + parseInt(this.surface.element.style.marginLeft),p.y + parseInt(this.surface.element.style.marginTop));
}