diff --git a/source/Ox.UI/js/Core/Element.js b/source/Ox.UI/js/Core/Element.js index ef00e0e0..f13c1ffe 100644 --- a/source/Ox.UI/js/Core/Element.js +++ b/source/Ox.UI/js/Core/Element.js @@ -1,77 +1,77 @@ 'use strict'; /*@ -Ox.Element Basic UI element object - # Usage -------------------------------------------------------------------- - ([options[, self]]) -> Element object +Ox.Element Basic UI element object # Arguments ---------------------------------------------------------------- - options Options of the element, or just `element` option - # Properties - element Tagname or CSS selector - tooltip Tooltip title, or a function that returns one - (e) -> tooltip title - e mouse event - self Shared private variable - # Events ------------------------------------------------------------------- - anyclick anyclick - Fires on mouseup, but not on any subsequent mouseup within 250 ms (this - is useful if one wants to listen for singleclicks, but not doubleclicks, - since it will fire immediately, and won't fire again in case of a - doubleclick) - * <*> original event properties - doubleclick doubleclick - Fires on the second mousedown within 250 ms (this is useful if one wants - to listen for both singleclicks and doubleclicks, since it will not - trigger a singleclick event) - * <*> original event properties - drag drag - Fires on mousemove after dragstart, stops firing on mouseup - clientDX horizontal drag delta in px - clientDY vertical drag delta in px - * <*> original event properties - dragend dragpause - Fires on mouseup after dragstart - clientDX horizontal drag delta in px - clientDY vertical drag delta in px - * <*> original event properties - dragenter dragenter - Fires when entering an element during drag (this fires on the element - being dragged -- the target element is the event's target property) - clientDX horizontal drag delta in px - clientDY vertical drag delta in px - * <*> original event properties - dragleave dragleave - Fires when leaving an element during drag (this fires on the element - being dragged -- the target element is the event's target property) - clientDX horizontal drag delta in px - clientDY vertical drag delta in px - * <*> original event properties - dragpause dragpause - Fires once when the mouse doesn't move for 250 ms during drag (this is - useful in order to execute operations that are too expensive to be - attached to the drag event) - clientDX horizontal drag delta in px - clientDY vertical drag delta in px - * <*> original event properties - mousedown mousedown - Fires on mousedown (this is useful if one wants to listen for - singleclicks, but not doubleclicks or drag events, and wants the event - to fire as early as possible) - * <*> original event properties - dragstart dragstart - Fires when the mouse is down for 250 ms - * <*> original event properties - mouserepeat mouserepeat - Fires every 50 ms after the mouse was down for 250 ms, stops firing on - mouseleave or mouseup (this fires like a key that is being pressed and - held, and is useful for buttons like scrollbars arrows that need to - react to both clicking and holding) - singleclick singleclick - Fires 250 ms after mouseup, if there was no subsequent mousedown (this - is useful if one wants to listen for both singleclicks and doubleclicks, - since it will not fire for doubleclicks) - * <*> original event properties -@*/ + options Options of the element, or just the `element` option + element Tagname or CSS selector + tooltip Tooltip title, or a function that returns one + (e) -> Tooltip title + e Mouse event + self Shared private variable + # Usage -------------------------------------------------------------------- + ([options[, self]]) -> Element object + # Events --------------------------------------------------------------- + anyclick anyclick + Fires on mouseup, but not on any subsequent mouseup within 250 ms + (this is useful if one wants to listen for singleclicks, but not + doubleclicks, since it will fire immediately, and won't fire again + in case of a doubleclick) + * <*> Original event properties + doubleclick doubleclick + Fires on the second mousedown within 250 ms (this is useful if one + wants to listen for both singleclicks and doubleclicks, since it + will not trigger a singleclick event) + * <*> Original event properties + drag drag + Fires on mousemove after dragstart, stops firing on mouseup + clientDX Horizontal drag delta in px + clientDY Vertical drag delta in px + * <*> Original event properties + dragend dragpause + Fires on mouseup after dragstart + clientDX Horizontal drag delta in px + clientDY Vertical drag delta in px + * <*> Original event properties + dragenter dragenter + Fires when entering an element during drag (this fires on the + element being dragged -- the target element is the event's target + property) + clientDX Horizontal drag delta in px + clientDY Vertical drag delta in px + * <*> Original event properties + dragleave dragleave + Fires when leaving an element during drag (this fires on the element + being dragged -- the target element is the event's target property) + clientDX Horizontal drag delta in px + clientDY Vertical drag delta in px + * <*> Original event properties + dragpause dragpause + Fires once when the mouse doesn't move for 250 ms during drag (this + is useful in order to execute operations that are too expensive to + be attached to the drag event) + clientDX Horizontal drag delta in px + clientDY Vertical drag delta in px + * <*> Original event properties + mousedown mousedown + Fires on mousedown (this is useful if one wants to listen for + singleclicks, but not doubleclicks or drag events, and wants the + event to fire as early as possible) + * <*> Original event properties + dragstart dragstart + Fires when the mouse is down for 250 ms + * <*> Original event properties + mouserepeat mouserepeat + Fires every 50 ms after the mouse was down for 250 ms, stops firing + on mouseleave or mouseup (this fires like a key that is being + pressed and held, and is useful for buttons like scrollbars arrows + that need to react to both clicking and holding) + singleclick singleclick + Fires 250 ms after mouseup, if there was no subsequent mousedown + (this is useful if one wants to listen for both singleclicks and + doubleclicks, since it will not fire for doubleclicks) + * <*> Original event properties +*/ Ox.Element = function(options, self) { diff --git a/source/Ox.UI/js/Core/JQueryElement.js b/source/Ox.UI/js/Core/JQueryElement.js index 5a6a7031..a99f0ceb 100644 --- a/source/Ox.UI/js/Core/JQueryElement.js +++ b/source/Ox.UI/js/Core/JQueryElement.js @@ -6,13 +6,13 @@ Ox.JQueryElement Wrapper for jQuery $element jQuery DOM Element @*/ Ox.JQueryElement = function($element) { - //@ id Unique id + //@ id Unique id this.oxid = Ox.uid(); - //@ $element The jQuery-wrapped DOM element + //@ $element The jQuery-wrapped DOM element this.$element = $element.data({oxid: this.oxid}); - //@ 0 The DOM element (for compatibility with jQuery) + //@ 0 The DOM element (for compatibility with jQuery) this[0] = this.$element[0]; - //@ length 1 (for compatibility with jQuery) + //@ length 1 (for compatibility with jQuery) this.length = 1; Ox.UI.elements[this.oxid] = this; return this;