fix legacy slice/top conversion
This commit is contained in:
parent
91ad27f540
commit
5403fd8a07
2 changed files with 2 additions and 6 deletions
|
|
@ -91,11 +91,7 @@ AP.addOnce = function(val) {
|
|||
* shallow cloning with clone(arg) call on each new element
|
||||
*/
|
||||
AP.clone = function() {
|
||||
let na = this.slice(),
|
||||
ln = na.length,
|
||||
i = 0;
|
||||
while (i < ln) na[i] = na[i++].clone(...arguments);
|
||||
return na;
|
||||
return this.map(v => v.clone(...arguments));
|
||||
};
|
||||
|
||||
AP.xray = function(arg) {
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class Slice {
|
|||
if (data.length) {
|
||||
// standard legacy polygon
|
||||
let top = new Top(data);
|
||||
this.tops.push(data);
|
||||
this.tops.push(top);
|
||||
top.simple = data;
|
||||
return top;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue