# HG changeset patch # User wycc # Date 1302498011 -28800 # Node ID a9e96291ef0b7a7d3ddd36989986211a27f93b60 # Parent b12c513212af6df809a65268339fc105c5652485 Clone the javascrip properties of the object return by clone_from_subtree. This should be relocated to the javascript version of the clone_from_subtree in the future. diff -r b12c513212af -r a9e96291ef0b nodejs/mbapp.js --- a/nodejs/mbapp.js Mon Apr 11 12:54:39 2011 +0800 +++ b/nodejs/mbapp.js Mon Apr 11 13:00:11 2011 +0800 @@ -207,11 +207,23 @@ var dup = this.mb_rt.coord_new(src.parent); for (i in nodes) { var c = nodes[i]; - var ng = this.mb_rt.coord_new(dup); var k = dup.clone_from_subtree(c); c.dup = k; c.dup.id = c.id; c.dup.refid = c.refid; + // The following code should be relocated to the javascript wrapper + // the clone_from_subtree in the future. + try { + k.bbox = c.bbox; + k.bbox.owner = k; + } catch(e) { + } + + try { + k.center = c.center; + k.center.owner = c.owner; + } catch(e) { + } } src.dup = dup; } else {