I’m trying to define the following class but it’s giving me an error:
Error: declare dashboardFloatingPane: mixin #0 is not a callable constructor.
define(["dojo/_base/declare", "dojo/dnd/move", "dojox/layout/FloatingPane"],
function(declare, move, FloatingPane){
return declare("dashboardFloatingPane", [move, FloatingPane], {
constructor: function() {
this.inherited(arguments);
this.moveable = new dojo.dnd.move.constrainedMoveable(
this.domNode, {
handle: this.focusNode,
constraints: function() {
var coordsWindow = {
l: 0,
t: 20,
w: window.innerWidth,
h: window.innerHeight
};
return coordsWindow;
}, within: true
}
);
}
});
});
What am I missing?
Many thanks
In example #1 you are trying to use the
dojo/dnd/movemodule as a parent of your class, whereas in example #2 you are not.vs
I don’t believe the
dojo/dnd/movemodule is not a valid class to be inheriting from, thus the error that it is not a callable constructor.