Mercurial > pub > ImplabJs
diff src/djol/_ToolBase.js @ 34:27e8e9e38e07 default tip
Слияние
author | nickolay |
---|---|
date | Wed, 05 Jun 2019 20:44:15 +0300 |
parents | 8af8e840dd49 1dc2fd263b90 |
children |
line wrap: on
line diff
--- a/src/djol/_ToolBase.js Wed Jun 05 17:44:17 2019 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -define([ - "dojo/_base/declare", - "dojo/when", - "implab/safe", - "implab/guard", - "implab/components/_ActivatableMixin", - "implab/log/_LogMixin", - "dojo/Evented", - "./ToolType" ], - -function(declare, when, safe, guard, _ActivatableMixin, _LogMixin, Evented, ToolType) { - return declare([ _ActivatableMixin, Evented ], { - toolType : ToolType.Activatable, - - module : null, - - constructor : function(opts) { - if (opts) { - if (opts.controller) - this.setController(opts.controller); - } - }, - - onActivating : function() { - var me = this, inherited = this.getInherited(arguments); - if (me.module && !me.module.isActive()) - return me.module.activate().then(function(active) { - return active ? inherited.apply(me) : false; - }); - else - return inherited.apply(me); - }, - - onActivated : function() { - this.emit("active", true); - }, - - onDeactivated : function() { - this.emit("active", false); - }, - - destroy : function() { - - } - }); -}); \ No newline at end of file