I have a class for mouse events. I use dojo b / c I like his approach to OO
dojo.declare("MouseObject", null, {
constructor: function(){},
onclick : function(){...},
_onClick : function(){...}
});
_onClick()listens for events with a click / release of the mouse created in the window, and determines whether a click has occurred. If it has, it onClick()is called. onClick()performs functions common to all possible clicks, so it needs to be called every time the user clicks.
sometimes the user may want to expand the functionality onClick()Anyway, to enable the original functionality without copying the insert? Two ways I can think of, none of which I like,
dojo.declare("MouseObjectChild", [MouseObject], {
constructor: function(){},
onclick : function(){this.inherited(arguments);...}
});
, , ,
dojo.declare("MouseObject", null, {
constructor: function(){},
onclick : function(){this._onClick()...},
_onClick : function(){...},
__onClick : function(){...}
});
, , . , , , . , ? ? :
beforeDraw();
draw();
afterDraw();
? ?