search for: pointerx

Displaying 20 results from an estimated 22 matches for "pointerx".

Did you mean: pointer
2006 Jan 16
2
Behaviour.js and prototype Event.pointerX
is there a way to take advantage of prototypes Event.pointerX when using Behaviour to manage my events? somthing like.. var myrules = { ''body'' : function(el){ el.onclick = function(){ alert(Event.pointerX(e)); } } }; thanks ______________________________________________________________________ Alex Duffield . Principal . InC...
2005 Oct 04
1
using events...
...to work well. Event.observe(''scalebar'', ''click'', function(){ alert (''clicked me at'') }); What I want to do is get the mouse position ether relative to the window, or even better to the "scalebar" div... I see there are pointerX(event) and pointerY(event) functions in prototype, but cant for the life of me figure out how to use them to get the info I am looking for. Thanks! ______________________________________________________________________ Alex Duffield . Principal . InControl Solutions . http:// www.incontrolsol...
2006 Jun 15
3
RE: Yahoo!-like Eventobjectemulation/abstractioninPrototype?
...unction (event) { for (attr in event) { this[attr] = event[attr]; } this.target = Event.element(event); this.srcElement = Event.element(event); this.which = event.which || event.button; this.button = event.button || event.which; this.pageX = Event.pointerX(event); this.pageY = Event.pointerY(event); this.clientX = this.pageX - (document.documentElement.scrollLeft || document.body.scrollLeft); this.clientY = this.pageY - (document.documentElement.scrollTop || document.body.scrollTop); this.preventDefault = Event.stop.bind(...
2007 May 11
15
Simulating onmouseleave and onmouseenter with Prototype
...plementing onmouseleave/onmouseenter the way that mootools has it, I saw that the sweet prototype API has a Pointer class. I''m still a bit green with Prototype, but my answer came in this shape: Event.observe(nav, ''mouseout'', function(e) { if(!Position.within(nav,Event.pointerX(e),Event.pointerY(e))){ alert(''...mouse is now truly outside nav...''); }); } }); Have a good day! Sudara --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" grou...
2005 Aug 18
0
Possible bug with scriptaculous dragdrop.js
Hi all. I think the following code in dragdrop.js fire: function(event, element) { if(!this.last_active) return; Position.prepare(); if (this.isAffected(Event.pointerX(event), Event.pointerY(event), element, this.last_active)) if (this.last_active.onDrop) this.last_active.onDrop(element, this.last_active); } should be changed to fire: function(event, element) { if(!this.last_active) return; Position.prepare(); if (this.isAff...
2006 Apr 20
1
The Autocompleter, with scrollable result-div
...lement.show(this.iefix); @@ -176,6 +176,13 @@ }, onBlur: function(event) { + // Dont hide the div on "blur" if the user clicks scrollbar + if(Element.getStyle(this.update, ''height'') != ''''){ + if( Position.within( this.update , Event.pointerX(event) , Event.pointerY(event) ) ){ + Event.observe(this.update, "blur", this.onBlur.bindAsEventListener(this),true); // make sure blur is still around on + return; + } + } // needed to make click events working setTimeout(this.hide.bind(this), 25...
2006 Nov 12
1
[PATCH] Annotate shapes, text and dbus support
...NE_WIDTH_DEFAULT 3.0f +#define ANNO_LINE_WIDTH_PRECISION 0.1f + +#define ANNO_STROKE_WIDTH_MIN 0.1f +#define ANNO_STROKE_WIDTH_MAX 20.0f +#define ANNO_STROKE_WIDTH_DEFAULT 1.0f +#define ANNO_STROKE_WIDTH_PRECISION 0.1f + + static int displayPrivateIndex; static int annoLastPointerX = 0; static int annoLastPointerY = 0; -#define ANNO_DISPLAY_OPTION_INITIATE 0 -#define ANNO_DISPLAY_OPTION_ERASE 1 -#define ANNO_DISPLAY_OPTION_CLEAR 2 -#define ANNO_DISPLAY_OPTION_COLOR 3 -#define ANNO_DISPLAY_OPTION_NUM 4 +static char *tools[] = { N_("Brush"), + N_(&...
2006 Jan 11
3
sortables callbacks
i know someone just recently asked about queueing ajax requests, my question is similar in the regards that i don''t want my application to send multiple requests. i have 2 sortabbles lists left, and right. when i move an item from left to the right the onUpdate callback will send 2 ajax requests. one for each sortables. however. i want it to serialize and send back the results from
2006 Jun 14
4
Extend Draggable
Hello all, I want to extend a draggable object so it has one more attribute (type attribute, so I can distinguish different draggable types). Can anyone tell me how to do it? I''ve search throught the examples (like http://wiki.script.aculo.us/scriptaculous/show/ExtendClass) but I can''t seem to understand what I should do. Thanks for you help, H
2007 Oct 04
0
Getting mouse position from a timed function - My Solution
...pointerTracker = Class.create({ initialize: function(){ this.x = null; this.y = null; this.bodyEl = $(document.body); //Bind event listener. this.boundUpdatePosition = this.updatePosition.bindAsEventListener(this); this.start(); }, updatePosition: function(event){ this.x = event.pointerX(); this.y = event.pointerY(); }, start: function(){ this.bodyEl.observe(''mousemove'', this.boundUpdatePosition); }, stop: function(){ this.bodyEl.stopObserving(''mousemove'', this.boundUpdatePosition); }, within: function(element){ //is the cursor with...
2006 Jan 11
1
switching two nodes
Hi, Is there a simple api in scriptaculous or prototype, to simply switch two nodes in the dom tree ? or do i have to code it. (a sweet option would be to be able to hook an effect as well) My use case is to drag and drop elements to switch them Regards Tarek -- Tarek Ziadé | www.afpy.org Python - why settle for snake oil when you can have the whole snake? (Mark Jackson)
2005 Dec 03
0
dragdrop patch that enables dragging from and to divs with overflow:scroll
...this.onFront=true; < pos=Position.page(this.element); < < this.originalLeft = pos[0]; < this.originalTop = pos[1]; < this.originalZ=1000; < document.body.appendChild(this.element); < < var pointer = [Event.pointerX(event), Event.pointerY(event)]; < < this.offsetX = (pointer[0] - pos[0]); < this.offsetY = (pointer[1] - pos[1]); < < this.element.style.left=pos[0]+"px"; < this.element.style.top=pos[1]+"px"; < < } _______...
2005 Dec 23
1
floating layer following the mouse
Hello, I have added a fade-in/fade-out floating layer to display infos on Ajax request. I have used Position to display it on a corner. Is there a simple way to make this floating layer displayed near the mouse and make it follow the mouse movments Tarek -- Tarek Ziadé | www.afpy.org Python - why settle for snake oil when you can have the whole snake? (Mark Jackson)
2005 Aug 10
2
extend question
Is it possible to call the super class''s version of a function from a subclass? SuperClass = Class.create(); SuperClass.prototype = { initialize: function(){ this.varA = ''''; this.varB = ''''; } } SubClass = Class.create(); SubClass.prototype = (new SuperClass()).extend({ initialize: function(somevar) { this.somevar = somevar; }
2006 May 01
0
RE: Leak in the Autocompleter, with scrollable result-div ?
...> > > > }, > > > > onBlur: function(event) { > > + // Dont hide the div on "blur" if the user clicks scrollbar > > + if(Element.getStyle(this.update, 'height') != ''){ > > + if( Position.within( this.update , Event.pointerX(event) , > > Event.pointerY(event) ) ){ > > + Event.observe(this.update, "blur", > > this.onBlur.bindAsEventListener(this),true); // make sure blur is > > still around on > > + return; > > + } > > + } > >...
2006 Feb 14
0
Another draggable/droppable performance booster
...s into the main build and somehow figure out how to circumvent that problem, or allow it to be configurable so people can choose between the 2 methods... MODIFIED FUNCTIONS IN THE DRAGGABLES CLASS updateDrag: function(event) { if(!this.activeDraggable) return; var pointer = [Event.pointerX(event), Event.pointerY(event)]; // Mozilla-based browsers fire successive mousemove events with // the same coordinates, prevent needless redrawing (moz bug?) if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; this._lastPointer = pointer;...
2006 Feb 09
3
Draggables and Droppable performance (tips)
...functions if you need (or add any other conditions there for your application) this.createDroppableListener = function(evt) { if (!this.checking && evt && Draggables.activeDraggable) { this.checking = true; var pos = [Event.pointerX(evt), Event.pointerY(evt)]; setTimeout(function() { if (Position.within($("elementToBecomeDroppable"), pos[0], pos[1])) { Droppables.add($("elementToBecomeDroppable"), {...options...} )...
2008 Jan 14
13
prototype/script.aculo.us ecosystem
Recently errtheblog (http://errtheblog.com/) put up a nice post about jQuery. Putting aside all the assertions about cleaner code and fewer lines of code than with Prototype, the one thing that struck me from his (and others'') writing and from direct inspection is this: jQuery seems to have a more of an ecosystem surrounding it. That is, more plugins, widgets, locked-and-loaded
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...ress events if window isn't currently focused, fails for Safari this.activeDraggable = draggable; } }, - + deactivate: function() { this.activeDraggable = null; }, - + updateDrag: function(event) { if(!this.activeDraggable) return; var pointer = [Event.pointerX(event), Event.pointerY(event)]; @@ -173,36 +173,36 @@ var Draggables = { // the same coordinates, prevent needless redrawing (moz bug?) if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return; this._lastPointer = pointer; - + this.activeDra...
2007 Aug 03
4
[ANNOUNCE] compiz-0.5.2
...Allow plugins to hook into scalePaintDecoration. Use fleur cursor instead of plus cursor when moving Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/app/compiz Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/app/compiz Use pointerX and pointerY when initializing deltas. Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/app/compiz Make sure we free the window private index. Set hoveredWindow more properly. Do not fall-through if path isn't long enough to be an Add some ba...