@imposium-hub/components 1.24.6 → 1.24.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,8 +43,8 @@ class CompositionRendererLayer extends React.PureComponent<ICompositionRendererL
|
|
|
43
43
|
private handleDrag(e) {
|
|
44
44
|
|
|
45
45
|
const newLayer = {...this.props.layer};
|
|
46
|
-
newLayer.x = e.left;
|
|
47
|
-
newLayer.y = e.top;
|
|
46
|
+
newLayer.x = Math.round(e.left);
|
|
47
|
+
newLayer.y = Math.round(e.top);
|
|
48
48
|
|
|
49
49
|
this.props.onUpdate(newLayer);
|
|
50
50
|
}
|
|
@@ -52,8 +52,8 @@ class CompositionRendererLayer extends React.PureComponent<ICompositionRendererL
|
|
|
52
52
|
private handleResize(e) {
|
|
53
53
|
|
|
54
54
|
const newLayer = {...this.props.layer};
|
|
55
|
-
newLayer.width = e.width;
|
|
56
|
-
newLayer.height = e.height;
|
|
55
|
+
newLayer.width = Math.round(e.width);
|
|
56
|
+
newLayer.height = Math.round(e.height);
|
|
57
57
|
|
|
58
58
|
this.props.onUpdate(newLayer);
|
|
59
59
|
}
|
|
@@ -61,7 +61,7 @@ class CompositionRendererLayer extends React.PureComponent<ICompositionRendererL
|
|
|
61
61
|
private handleRotate(e) {
|
|
62
62
|
|
|
63
63
|
const newLayer = {...this.props.layer};
|
|
64
|
-
newLayer.rotation = e.beforeDelta + newLayer.rotation;
|
|
64
|
+
newLayer.rotation = Math.round(e.beforeDelta + newLayer.rotation);
|
|
65
65
|
|
|
66
66
|
this.props.onUpdate(newLayer);
|
|
67
67
|
}
|
|
@@ -14,6 +14,7 @@ interface ISelectFieldProps {
|
|
|
14
14
|
selectRef? : any;
|
|
15
15
|
options : any;
|
|
16
16
|
disable ? : boolean;
|
|
17
|
+
disableFirst ? : boolean;
|
|
17
18
|
tooltip ? : IToolTipConfig | string;
|
|
18
19
|
placeholder? : string;
|
|
19
20
|
value : any;
|
|
@@ -42,7 +43,7 @@ class SelectField extends React.PureComponent<ISelectFieldProps, {}> {
|
|
|
42
43
|
|
|
43
44
|
public render() {
|
|
44
45
|
|
|
45
|
-
const {label, placeholder, options, value, width, buttons, selectRef, disable, tooltip, info, labelPosition} = this.props;
|
|
46
|
+
const {label, placeholder, options, value, width, buttons, selectRef, disable, tooltip, info, labelPosition, disableFirst} = this.props;
|
|
46
47
|
let opts = [];
|
|
47
48
|
|
|
48
49
|
const caret = <div key = 'caret' className = 'caret'>{ICON_CARET_DOWN}</div>;
|
|
@@ -60,9 +61,11 @@ class SelectField extends React.PureComponent<ISelectFieldProps, {}> {
|
|
|
60
61
|
|
|
61
62
|
if (options) {
|
|
62
63
|
opts = options.map((option , i) => {
|
|
64
|
+
|
|
65
|
+
const disabled = (i === 0 && disableFirst) ? true : false;
|
|
63
66
|
const optionValue = (option.value !== undefined) ? option.value : option;
|
|
64
67
|
const optionLabel = (option.label !== undefined) ? option.label : option;
|
|
65
|
-
return <option key = {`option-${optionValue}`} value = {optionValue}>{optionLabel}</option>;
|
|
68
|
+
return <option disabled = {disabled} key = {`option-${optionValue}`} value = {optionValue}>{optionLabel}</option>;
|
|
66
69
|
});
|
|
67
70
|
}
|
|
68
71
|
|