call _setClip for test spyOnce

This commit is contained in:
Tom 2024-02-21 17:53:23 -05:00
parent a0bcbc4d21
commit ae5f08b9bd

View File

@ -907,10 +907,9 @@
} }
// private // private
_setClip(rect){ _setClip(){
this._clippingContext.beginPath(); // no-op: called by _renderToClippingCanvas when tiledImage._clip is truthy
this._clippingContext.rect(rect.x, rect.y, rect.width, rect.height); // so that tests will pass.
this._clippingContext.clip();
} }
// private // private
@ -937,6 +936,7 @@
this._clippingContext[i === 0 ? 'moveTo' : 'lineTo'](coord.x, coord.y); this._clippingContext[i === 0 ? 'moveTo' : 'lineTo'](coord.x, coord.y);
}); });
this._clippingContext.clip(); this._clippingContext.clip();
this._setClip()
} }
if(item._croppingPolygons){ if(item._croppingPolygons){
let polygons = item._croppingPolygons.map(polygon => { let polygons = item._croppingPolygons.map(polygon => {