hyper-overlay icon indicating copy to clipboard operation
hyper-overlay copied to clipboard

setBounds paramters need a Int value

Open imziyang opened this issue 6 years ago • 1 comments

When the position set to center, maybe caused an error:

TypeError: Error processing argument at index 0, conversion failure from

So I think the code:

this._win.setBounds({x: width / 4, y: height / 4, width: width / 2, height: height / 2}, this._config.animate)

need to be:

this._win.setBounds({x: Math.round(width / 4), y: Math.round(height / 4), width: Math.round(width / 2), height: Math.round(height / 2)}, this._config.animate)

imziyang avatar May 21 '19 08:05 imziyang

emm, maybe the code in _startBounds is Math.round not Math.abs

imziyang avatar May 21 '19 08:05 imziyang