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

Merge pull request #8970 from BabylonJS/msDestiny14/nme

NME - Bug fix for color picker
David Catuhe пре 5 година
родитељ
комит
b542c89762

Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
nodeEditor/src/components/preview/svgs/directionalLeft.svg


Разлика између датотеке није приказан због своје велике величине
+ 1 - 1
nodeEditor/src/components/preview/svgs/directionalRight.svg


+ 6 - 1
nodeEditor/src/sharedComponents/colorPickerComponent.tsx

@@ -65,7 +65,12 @@ export class ColorPickerLineComponent extends React.Component<IColorPickerCompon
             || nextState.pickerEnabled !== this.state.pickerEnabled;
         
         if(result) {
-            nextState.color = nextProps.value;
+            nextState.color =  {
+                r: nextProps.value.r * 255,
+                g: nextProps.value.g * 255,
+                b: nextProps.value.b * 255,
+                a: nextProps.value instanceof Color4 ? nextProps.value.a : 1,
+            };
             nextState.hex = nextProps.value.toHexString();
         }
         return result;