Преглед изворни кода

Layers: Fix set() (#22867)

Related issue: #22817
Description:
After calling `set(31)`, the value of mask will be updated to 2147483648 instead of -2147483648
Matrix пре 3 година
родитељ
комит
bf9f2eceb8
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/core/Layers.js

+ 1 - 1
src/core/Layers.js

@@ -8,7 +8,7 @@ class Layers {
 
 	set( channel ) {
 
-		this.mask = 1 << channel | 0;
+		this.mask = ( 1 << channel | 0 ) >>> 0;
 
 	}