Permalink
Browse files

Fix issue 1: polygons with "nonzero" initial arg don't display, break…

… quick edit for shapes
  • Loading branch information...
1 parent 295b258 commit 01d6b4e0ad0b075c8432a5c5c54cbf2079c91442 @bemjb bemjb committed Oct 18, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −1 main.js
  2. +1 −0 test.css
View
@@ -304,7 +304,7 @@ define(function (require, exports, module) {
} else {
if (/^\s*(nonzero|evenodd)\s*$/.test(params[0])) {
polygon.setAttribute("fill-rule", params[0].trim());
- params = params.slice(0);
+ params = params.slice(1);
}
// parse all of the points and find the min and max
points = $.map(params, function (point, index) {
@@ -408,6 +408,10 @@ define(function (require, exports, module) {
}
declaration = _getTokenListForCurrentDeclaration(hostEditor);
+ if (!declaration) {
+ return null;
+ }
+
shapeViewer = _shapeViewers[pos.line];
if (shapeViewer) {
// FIXME we should check and see if we're on a different declaration on
View
@@ -8,4 +8,5 @@
shape-inside: rectangle(45px, 45px, 90px, 60px);
shape-inside: ellipse(100cm, 100in, 100mm, 100cm);
shape-inside: polygon(-10px 20px, 30px 40px, -10px 50px);
+ -webkit-shape-inside: polygon(nonzero, 300px 20px, 585px 20px, 1220px 655px, 0px 655px);
}

0 comments on commit 01d6b4e

Please sign in to comment.