mirror of
https://github.com/konvajs/konva.git
synced 2025-09-19 10:47:59 +08:00
replace bitwise OR with Math.round
This commit is contained in:
@@ -121,7 +121,7 @@
|
||||
|
||||
bufferHitCanvas.getContext().clear();
|
||||
this.drawScene(bufferHitCanvas);
|
||||
p = bufferHitCanvas.context.getImageData(pos.x | 0, pos.y | 0, 1, 1).data;
|
||||
p = bufferHitCanvas.context.getImageData(Math.round(pos.x), Math.round(pos.y), 1, 1).data;
|
||||
return p[3] > 0;
|
||||
},
|
||||
// extends Node.prototype.destroy
|
||||
|
@@ -334,7 +334,7 @@
|
||||
* @param {Object} imageData
|
||||
*/
|
||||
Kinetic.Filters.Blur = function(imageData) {
|
||||
var radius = this.blurRadius() | 0;
|
||||
var radius = Math.round(this.blurRadius());
|
||||
|
||||
if (radius > 0) {
|
||||
filterGaussBlurRGBA(imageData, radius);
|
||||
|
Reference in New Issue
Block a user