Merge branch 'master' into kiri-mesh-animate2

This commit is contained in:
Stewart Allen 2022-10-27 23:20:42 -04:00
commit 37efc0bd20
2 changed files with 2 additions and 2 deletions

View file

@ -22,7 +22,7 @@ if (!AP.flat) {
}; };
} }
AP.find = function(fn) { AP.findWith = function(fn) {
for (let i=0, l=this.length; i<l; i++) { for (let i=0, l=this.length; i<l; i++) {
if (fn(this[i])) { if (fn(this[i])) {
return i; return i;

View file

@ -310,7 +310,7 @@ CAM.init = function(kiri, api) {
let oplist = current.process.ops; let oplist = current.process.ops;
if (oplist.indexOf(rec) < 0) { if (oplist.indexOf(rec) < 0) {
oplist.push(rec); oplist.push(rec);
let fpos = oplist.find(rec => rec.type === 'flip'); let fpos = oplist.findWith(rec => rec.type === 'flip');
if (fpos >= 0 && oplist.length > 1) { if (fpos >= 0 && oplist.length > 1) {
let oprec = oplist.splice(fpos,1); let oprec = oplist.splice(fpos,1);
oplist.push(oprec[0]); oplist.push(oprec[0]);