First implementation of tool tester

This commit is contained in:
jdescottes
2014-08-21 00:50:59 +02:00
parent 34dbcedec3
commit 1955d3f8f5
12 changed files with 422 additions and 30 deletions

View File

@@ -38,6 +38,8 @@
this.selectTool_(this.tools[0]);
// Activate listener on tool panel:
$("#tool-section").mousedown($.proxy(this.onToolIconClicked_, this));
$.subscribe(Events.SELECT_TOOL, this.onSelectToolEvent_.bind(this));
};
/**
@@ -54,6 +56,13 @@
stage.data("selected-tool-class", tool.instance.toolId);
};
ns.ToolController.prototype.onSelectToolEvent_ = function(event, toolId) {
var tool = this.getToolById_(toolId);
if (tool) {
this.selectTool_(tool);
}
};
/**
* @private
*/