zitob9 / curved-corner

Automatically exported from code.google.com/p/curved-corner
0 stars 0 forks source link

Fix with backgound-repeat #68

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Now all v:fill always set fill.type is 'tile'
Can you change this to set fill.type depends on css backgournd-repeat style.

@@ -42,6 +42,7 @@
                               Math.min(this.offsetWidth, this.offsetHeight), 1);
        var fillColor = this.currentStyle.backgroundColor;
        var fillSrc = this.currentStyle.backgroundImage.replace(/^url\("(.+)"\)$/, '$1');
+       var fillType = this.currentStyle.backgroundRepeat;
        var strokeColor = this.currentStyle.borderColor;
        var strokeWeight = parseInt(this.currentStyle.borderWidth);
        var stroked = 'true';
@@ -92,7 +93,7 @@
        var fill = document.createElement('v:fill');
        fill.color = fillColor;
        fill.src = fillSrc;
-       fill.type = 'tile';
+       fill.type = 'no-repeat'==fillType ? 'frame' : 'tile';

        rect.appendChild(fill);
        el.appendChild(rect);

Original issue reported on code.google.com by Dovgosh...@gmail.com on 2 Mar 2011 at 1:07

Attachments: