-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agility and Raphael don't like each other.... #69
Comments
Hello Abdiel, Yeah from what you're saying it sounds like Raphael's gradient objects need to live in the DOM, and in Agility objects don't go to the DOM until you use Another workaround perhaps is to create a master Agility object that is appended to Either way you might have to bind to the Hope this helps. |
that sounds like a fair workaround. thanks. I'll try it out. |
Not sure if I'm following you. Here's what I tried and did not worked.
Seems pretty obvious that myRaphael is still created in memory... so the only solution is still to create the Raphael drawings after it's appended to the DOM. In other words, to add a method (say 'draw') to myRaphael and call that method on document 'append'... ? What I don't like about this is that I loose the inherent self contained nature of Agility. Another work around is to extend Raphael with a 'setup' method and passing Agility's in memory 'document' ($$.document?). What do you think? |
Sorry @abdielou I guess I'm just not familiar with Raphael to offer more feedback! All I can say is that Agility objects are always off-DOM, unless explicitly added to |
I'm not sure if this is a problem with Agility or Raphael or it's just that "Javascript - DOM" programming sucks. Here's the scenario:
1- I have Agility object A.
2- object A contains a div with id='r'
3- on 'create', object A creates a Raphael object by feeding Raphael with this.view.$('#r')[0]. Raphael creates an object and gives it a transparent gradient.
4- object A is added to the document by $$.document.append(A)
Result: the gradient is not shown.
Why: Raphael creates the gradient objects in the window.document, not in $$.document which lives in memory.
Workaround: create the Raphael object after step 4, not at step 3. this way, every agility object will already live in the DOM.
The text was updated successfully, but these errors were encountered: