Generate tool's markup automatically

This commit is contained in:
Vince
2012-09-15 20:25:45 +02:00
parent 1276f338c2
commit 440a6391e9
13 changed files with 39 additions and 27 deletions

View File

@@ -7,7 +7,8 @@
var ns = $.namespace("pskl.drawingtools");
ns.Circle = function() {
this.toolId = "tool-circle"
this.toolId = "tool-circle";
this.helpText = "Circle tool";
// Circle's first point coordinates (set in applyToolAt)
this.startCol = null;

View File

@@ -9,6 +9,7 @@
ns.Eraser = function() {
this.toolId = "tool-eraser";
this.helpText = "Eraser tool";
};
pskl.utils.inherit(ns.Eraser, ns.SimplePen);

View File

@@ -8,6 +8,7 @@
ns.Move = function() {
this.toolId = "tool-move"
this.helpText = "Move tool";
// Stroke's first point coordinates (set in applyToolAt)
this.startCol = null;

View File

@@ -7,7 +7,8 @@
var ns = $.namespace("pskl.drawingtools");
ns.PaintBucket = function() {
this.toolId = "tool-paint-bucket"
this.toolId = "tool-paint-bucket";
this.helpText = "Paint bucket tool";
};
pskl.utils.inherit(ns.PaintBucket, ns.BaseTool);

View File

@@ -7,7 +7,8 @@
var ns = $.namespace("pskl.drawingtools");
ns.Rectangle = function() {
this.toolId = "tool-rectangle"
this.toolId = "tool-rectangle";
this.helpText = "Rectangle tool";
// Rectangle's first point coordinates (set in applyToolAt)
this.startCol = null;

View File

@@ -8,6 +8,7 @@
ns.SimplePen = function() {
this.toolId = "tool-pen";
this.helpText = "Pen tool"
};
this.previousCol = null;

View File

@@ -7,8 +7,9 @@
var ns = $.namespace("pskl.drawingtools");
ns.Stroke = function() {
this.toolId = "tool-stroke"
this.toolId = "tool-stroke";
this.helpText = "Stroke tool";
// Stroke's first point coordinates (set in applyToolAt)
this.startCol = null;
this.startRow = null;

View File

@@ -8,6 +8,7 @@
ns.RectangleSelect = function() {
this.toolId = "tool-rectangle-select";
this.helpText = "Rectangle selection tool";
ns.BaseSelect.call(this);
};

View File

@@ -8,6 +8,7 @@
ns.ShapeSelect = function() {
this.toolId = "tool-shape-select";
this.helpText = "Shape selection tool";
ns.BaseSelect.call(this);
};