[Prototype-core] Re: New Name for Users Group (RoR Spinoffs)

2008-06-19 Thread Christophe Porteneuve

My question is, when users search Scriptaculous in Google, don't they 
get script.aculo.us results?  'course they do, tons of it, and the 
dot-split mark appears as an actual match.

So I think we should preserve the spelling (I know it's dear to Thomas) 
and not worry about it, I'm pretty convinced it's a non-issue.

-- 
Christophe Porteneuve aka TDD
[EMAIL PROTECTED]

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Capturing revert in draggable

2008-06-19 Thread Diodeus

I've seen a few posts about this, but no answers.

I would like to be able to call a function when a draggable revert
occurs. What I'm trying to do is replace a photo with an icon on drag
(which I've accomplished), but I need to swap it back if the revert
fires.

I really, really wish there were an onRevert() option, but there
isn't, so I guess I'll have to hack my own.

I think this is where I'd hook it in (line 231 in 1.8.0):

 reverteffect: function(element, top_offset, left_offset) {
var dur =
Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
new Effect.Move(element, { x: -left_offset, y: -top_offset,
duration: dur,
  queue: {scope:'_draggable', position:'end'}
});
  },

I propose putting it as a beforeStart call in the Effect.Move
function.

Does this make sense?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---



[Prototype-core] Re: Capturing revert in draggable

2008-06-19 Thread Ken Snyder

Diodeus wrote:
 I've seen a few posts about this, but no answers.

 I would like to be able to call a function when a draggable revert
 occurs. What I'm trying to do is replace a photo with an icon on drag
 (which I've accomplished), but I need to swap it back if the revert
 fires.

 I really, really wish there were an onRevert() option, but there
 isn't, so I guess I'll have to hack my own.

 ...

 I propose putting it as a beforeStart call in the Effect.Move
 function.

 Does this make sense?
   
Oh yes! I've copied and pasted that function many many times. I would 
like to see the callbacks beefed up with a custom event system that 
would allow something like this:

myDraggable.observe('revert', function(event) {
  if (myCriteria) {
event.stop(); // prevent the default revert effect
myRevertFunction(this);
  }
});

myDraggable.observe('revert', function(event) {
  doSomething(this);
  // revert affect continues
});

Looking at Thomas's personal version of effects.js leads me to believe 
he has a vision for something like this ( 
http://script.aculo.us/thomas/effects.js )

- Ken



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype: Core group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~--~~~~--~~--~--~---