Skip to content
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

clip-rect attribute lost after moving an element in the hierarchy in IE < 9 #528

Open
alerizzo opened this issue Mar 1, 2012 · 0 comments

Comments

@alerizzo
Copy link

alerizzo commented Mar 1, 2012

On paths and elements, if clip-rect attribute is set, moving the element in the hierarchy (aka, changing its z-index), makes the item to lose the clip-rect property in IE < 9 (i.e. in VML).

Here is a running example:
http://dl.dropbox.com/u/6700743/issues/raphael-clip-rect/index.html

Here is the source of the script:

var paper = new Raphael('test', 600, 400);
var c1 = paper.circle( 100, 100, 50 ).attr({ fill: 'red', 'clip-rect': '75,75,100,100'  });
var c2 = paper.circle( 150, 150, 70 ).attr({ fill: 'blue' });
c1.insertAfter(c2); // loses clip-rect

Looking at the code is visible that in VML a div with clipping is used to clip the element, but when the item is moved, it is not moved with its parent div (which is responsible for the clip-rect attribute of the element), but left behind as a div with no content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant