X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/vendor/oojs/oojs-ui/demos/classes/DraggableHandledItemWidget.js diff --git a/vendor/oojs/oojs-ui/demos/classes/DraggableHandledItemWidget.js b/vendor/oojs/oojs-ui/demos/classes/DraggableHandledItemWidget.js new file mode 100644 index 00000000..9ded7b50 --- /dev/null +++ b/vendor/oojs/oojs-ui/demos/classes/DraggableHandledItemWidget.js @@ -0,0 +1,19 @@ +/** + * Drag/drop items with custom handle + * + * @param {Object} [config] Configuration options + */ +Demo.DraggableHandledItemWidget = function DemoDraggableHandledItemWidget( config ) { + // Configuration initialization + config = config || {}; + + // Parent constructor + Demo.DraggableHandledItemWidget.parent.call( this, config ); + + // Mixin constructors + OO.ui.mixin.DraggableElement.call( this, $.extend( { $handle: this.$icon }, config ) ); +}; + +/* Setup */ +OO.inheritClass( Demo.DraggableHandledItemWidget, Demo.SimpleWidget ); +OO.mixinClass( Demo.DraggableHandledItemWidget, OO.ui.mixin.DraggableElement );