summaryrefslogtreecommitdiff
path: root/lib/dijit/form/_ListMouseMixin.js.uncompressed.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-08-14 19:04:32 +0400
committerAndrew Dolgov <[email protected]>2012-08-14 19:04:32 +0400
commit0181c0110985cfd2659e81c8cc1ef5a2f73bc697 (patch)
treee2250a345481fa63cfcf98d76830338ad7eb9818 /lib/dijit/form/_ListMouseMixin.js.uncompressed.js
parent973c4a649fd8f83ed85004f3365f10f9c24d8349 (diff)
dojo: remove uncompressed files
Diffstat (limited to 'lib/dijit/form/_ListMouseMixin.js.uncompressed.js')
-rw-r--r--lib/dijit/form/_ListMouseMixin.js.uncompressed.js96
1 files changed, 0 insertions, 96 deletions
diff --git a/lib/dijit/form/_ListMouseMixin.js.uncompressed.js b/lib/dijit/form/_ListMouseMixin.js.uncompressed.js
deleted file mode 100644
index 733a2a63f..000000000
--- a/lib/dijit/form/_ListMouseMixin.js.uncompressed.js
+++ /dev/null
@@ -1,96 +0,0 @@
-define("dijit/form/_ListMouseMixin", [
- "dojo/_base/declare", // declare
- "dojo/_base/event", // event.stop
- "dojo/touch",
- "./_ListBase"
-], function(declare, event, touch, _ListBase){
-
-/*=====
-var _ListBase = dijit.form._ListBase;
-=====*/
-
-// module:
-// dijit/form/_ListMouseMixin
-// summary:
-// a mixin to handle mouse or touch events for a focus-less menu
-
-return declare( "dijit.form._ListMouseMixin", _ListBase, {
- // summary:
- // a Mixin to handle mouse or touch events for a focus-less menu
- // Abstract methods that must be defined externally:
- // onClick: item was chosen (mousedown somewhere on the menu and mouseup somewhere on the menu)
- // tags:
- // private
-
- postCreate: function(){
- this.inherited(arguments);
- this.connect(this.domNode, touch.press, "_onMouseDown");
- this.connect(this.domNode, touch.release, "_onMouseUp");
- this.connect(this.domNode, "onmouseover", "_onMouseOver");
- this.connect(this.domNode, "onmouseout", "_onMouseOut");
- },
-
- _onMouseDown: function(/*Event*/ evt){
- event.stop(evt);
- if(this._hoveredNode){
- this.onUnhover(this._hoveredNode);
- this._hoveredNode = null;
- }
- this._isDragging = true;
- this._setSelectedAttr(this._getTarget(evt));
- },
-
- _onMouseUp: function(/*Event*/ evt){
- event.stop(evt);
- this._isDragging = false;
- var selectedNode = this._getSelectedAttr();
- var target = this._getTarget(evt);
- var hoveredNode = this._hoveredNode;
- if(selectedNode && target == selectedNode){
- this.onClick(selectedNode);
- }else if(hoveredNode && target == hoveredNode){ // drag to select
- this._setSelectedAttr(hoveredNode);
- this.onClick(hoveredNode);
- }
- },
-
- _onMouseOut: function(/*Event*/ /*===== evt ====*/){
- if(this._hoveredNode){
- this.onUnhover(this._hoveredNode);
- if(this._getSelectedAttr() == this._hoveredNode){
- this.onSelect(this._hoveredNode);
- }
- this._hoveredNode = null;
- }
- if(this._isDragging){
- this._cancelDrag = (new Date()).getTime() + 1000; // cancel in 1 second if no _onMouseOver fires
- }
- },
-
- _onMouseOver: function(/*Event*/ evt){
- if(this._cancelDrag){
- var time = (new Date()).getTime();
- if(time > this._cancelDrag){
- this._isDragging = false;
- }
- this._cancelDrag = null;
- }
- var node = this._getTarget(evt);
- if(!node){ return; }
- if(this._hoveredNode != node){
- if(this._hoveredNode){
- this._onMouseOut({ target: this._hoveredNode });
- }
- if(node && node.parentNode == this.containerNode){
- if(this._isDragging){
- this._setSelectedAttr(node);
- }else{
- this._hoveredNode = node;
- this.onHover(node);
- }
- }
- }
- }
-});
-
-});