Skip to content

Event is overwritten when Element.attr() is called in a handler (Raphael) #7

@xzed

Description

@xzed

I fire an Event with Eve:

eve("test.a");

if I have an Eve EventHandler in which Element.attr() is called:

eve.on("test.*",function(){
   console.log('#1',evt.nt());

   circle.attr('r',20);  // circle is defined somewhere else

   console.log('#2',evt.nt());
});

in the console:

 #1, "test.a"
 #2, "attr..."

the original Eventname is overwritten.

I found in the source code of Raphael, that when caling elproto.attr(),
a new Event is fired, which is the cause for this bug.

The problem is now, if you have a second EventHandler which also listens for "test.*",

and you want to elaborate inside which subname the Event has, you can't do this.

The original Problem may be in Eve..

if a Event is fired inside a Handler the original Event seems to be overwritten

I would be thankful for any respond / solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions