Code Monkey home page Code Monkey logo

eve's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eve's Issues

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

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.

No tags since 0.2.4

There have been no releases tagged since 0.2.4, and as it would be nice to be able to use eve from npm webjars, could somebody please put in a tag or two, maybe on 0.4.2 and 0.5.0?

Bower

Hi Guys,

Can you register eve with bower, please ?

It will be very helpful since Bower is integrated with Visual Studio and other library based on eve are available via bower.

Please find information here:

Please note that you need to mark version by git tag.

I have prepared bower file for you - but please double check before using: eve-bower.zip

Also it's recommended to add moduleType section - I skipped this because I wasn't sure about that.

simpler 'unbind' with scope (string) instead of function

Hey Dimitry,

I do highly respect your JavaScripts and maybe my suggestion is nonsense, I'd be happy for a hint what you would do.

Here's my scenario:

I have several models that subscribe to events from a socket. With eve, the binding would look like:

eve.on('change/Model_xyz', function() { ... })

There are tons of bindings all around the place. My understanding is that I could not simply unbind the particular event above, I'd need to wrap the anonymous function into some method (e.g. Model.make_stuff) and then pass this method when I do an unbind, correct?

eve.unbind('change/Model_xyz', Model.make_stuff)

I wonder if it would make sense to extend the implementation of eve, so that I could use a simple string to scope a bind/unbind. It my example, it would look like:

eve.on('change/Model_xyz', function() { ... }, 'unique_id_here')
eve.unbind('change/Model_xyz', 'unique_id_here')

What do you think? Does that make any sense to you?

Vue admin encountered an issue with npm install

hi, this is git address git://github.com/adobe-webplatform/eve.git is not avalible,but have so much program dependency this address,
then my very program not npm install.I come from china developer,i have a vue-admin program ,this program use eve. Is there a way to replace this address

Allow unbind for eve.once

Couldn't find a clean way to do it so my approach is to pass in a third variable ( array or pointer ) then modify eve.once to assign f2 to that variable, so i can unsub with eve.off("evt", f2).

eve.once = function (name, f, unbinder) {
var f2 = function () {
eve.unbind(name, f2);
return f.apply(this, arguments);
};
if(unbinder) unbinder.push(f2);
return eve.on(name, f2);
};

It's absolutely ugly but does the job for now. Does anyone have a cleaner way to implement ?

line240-243 why write like that

    return function (zIndex) {
        if (+zIndex == +zIndex) {
            f.zIndex = +zIndex;
        }
    };

I'm curious about why did U write like that? Isn't the condition ‘if’ always be true?

ReferenceError: assignment to undeclared variable eve

In strict mode the script causes a ReferenceError: assignment to undeclared variable eve when the eve function is assigned to the (undeclared) eve variable. This is a relatively new issue, caused by the declaration of variables being terminated after the "isArray" function.

It was not present in version 0.4.2, when the list was only terminated after the (then named) functioneve declaration.

Fix seems to be as simple as changing the semicolon in line 52 to a comma:

        isArray = Array.isArray || function (ar) {
            return ar instanceof Array || objtos.call(ar) == "[object Array]";
        }, //<---
        eve = function (name, scope) {

https://github.com/adobe-webplatform/eve/blob/master/eve.js#L52
https://github.com/adobe-webplatform/eve/blob/master/eve.js#L65

Eve fails for event names including Object.prototype properties

E.g.

 > eve.on('thing.constructor.hi', function() {})
TypeError: Cannot read property 'hi' of undefined

This is because your recursive traversal through the events object sees that e[names[i]] exists, and then tries to read e[names[i]].n.

We hit this with "watch" in Firefox where there's an Object.prototype.watch()

Documentation is wrong for eve() return value

Hi Dmitry,

The documentation for eve.js says that the eve() function will return an array of errors if any are found, but the code for the function will only ever return false or undefined.

Should the function be changed to match the documentation, or the other way around?

Cheers,

Gil

WebJar Request

Hi,
could you tell me how to create a proper jar file so that i can use in my project dependecies?

Unfortunately, i have no idea of what lib is using it as dependency(Looks like a chain of dependencies), so i really need this.
The jar is missing from bower and mvn repositories and the only source i found was this github project.

Thanks in advance.

Memory leak

Memory leak in adobe-webplatform/Snap.svg#369 is from eve.

From my post on the issue:

I found another accumulation of references within the event library "Eve". I think these might be the last of them: The event constructor / destructor are asymmetrical, the constructor walks the event tree creating any absent i-nodes in the event path before creating it's target event; the destructor removes it's target event from the tree but does not remove empty nodes in the event path above. For most events this results in a trail of redundant parent nodes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.