# HG changeset patch # User Thinker K.F. Li # Date 1289551983 -28800 # Node ID a9abcdac0ae5efcf13d47f2b3243daa4c44a7905 # Parent 960e2395973dc2cc9d97f3415402cd5eb4b9d10f Fix issue of moving lightbar of testsvg.js. The lightbar does not move as expectation. It caused by compute trasnforming matrix that transform saved points from the space when saving points to current space. The transform matrix should not include matric of the owner of saved points. diff -r 960e2395973d -r a9abcdac0ae5 nodejs/svg.js --- a/nodejs/svg.js Fri Nov 12 16:03:19 2010 +0800 +++ b/nodejs/svg.js Fri Nov 12 16:53:03 2010 +0800 @@ -453,8 +453,7 @@ var c = this.owner; var mtx; - if(c.type != "coord") - c = c.parent; // is a shape! + c = c.parent; mtx = c._mbapp_saved_rev_mtx; while(c.parent && typeof c.parent != "undefined") { @@ -469,8 +468,7 @@ var c = this.owner; var mtx; - if(c.type != "coord") - c = c.parent; // is a shape! + c = c.parent; mtx = [c[0], c[1], c[2], c[3], c[4], c[5]]; while(c.parent) { @@ -509,8 +507,7 @@ var c = this.owner; var mtx; - if(c.type != "coord") - c = c.parent; // is a shape! + c = c.parent; mtx = c._mbapp_saved_rev_mtx; while(c.parent && typeof c.parent != "undefined") { @@ -525,8 +522,7 @@ var c = this.owner; var mtx; - if(c.type != "coord") - c = c.parent; // is a shape! + c = c.parent; mtx = [c[0], c[1], c[2], c[3], c[4], c[5]]; while(c.parent) { @@ -611,6 +607,8 @@ */ get y() { return this._y; }, + /*! \brief Center position in the relative space defined by parent. + */ get rel() { var rev; var xy;