[General] Opera Debugging Thread

Philip Weaver philmaker at gmail.com
Wed May 6 15:36:07 CEST 2009


Yea! Progress with the polygons. Clock hands now working, star working,
polygons working. The underlying problem it seems was that SVGPointList had
existing points in a namespace of "NS1" (???)
In lively.scene.Polygon.setVertices

   - changed: this.rawNode.setAttributeNS(null, "points", attr);
   - to: this.rawNode.setAttribute("points", attr);

Sample code for lively.scene.Polygon.setVertices

    setVertices: function(vertlist) {
if (this.rawNode.points) {
    this.rawNode.points.clear();
}
if (this.useDOM) {
vertlist.forEach(function(p) { this.rawNode.points.appendItem(p) }, this);
} else {
var attr = vertlist.map(function(p) {
return (p.x||0.0) + "," + (p.y||0.0)
}).join(' ');

this.rawNode.setAttribute("points", attr);
if (true) {
var result = new XMLSerializer().serializeToString(this.rawNode);
console.log('this.rawNode:' + result);
}
}
    },
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://livelykernel.sunlabs.com/pipermail/general/attachments/20090506/582cd5ea/attachment.html 




More information about the lively-kernel mailing list