Closed Iulian33 closed 3 years ago
I will check, thx @Iulian33
I did not saw the difference between V3 implementation, initially then saw my typo "stream.Y" vs "stream.y". Sorry will make PR to fix ASAP.
// default draw function
const width = stream.width == null ? this.width : stream.width
const height = stream.height == null ? this.height : stream.height
this._ctx.drawImage(stream.element, stream.x, stream.y, width, height)
const canvasHeight = this.height;
const canvasWidth = this.width;
const height = stream.height || canvasHeight;
const width = stream.width || canvasWidth;
let positionX = stream.x || 0;
let positionY = stream.Y || 0;
try {
this._ctx?.drawImage(element, positionX, positionY, width, height);
} catch (err) {
// Ignore error possible "IndexSizeError (DOM Exception 1): The index is not in the allowed range." due Safari bug.
console.error(err);
}
Note: the V4 is a bit different cause had KeepRatio implementation in initial PR, will make separate PR for stream.keepRatio
Fixed in 4.0.1
Thx a lot ! appreciate your effort
not working
y:410
in version@4.0.0