@babylonjs/inspector 5.0.0-beta.6 → 5.0.0-beta.7
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.
@@ -46750,7 +46750,7 @@ var PropertyGridTabComponent = /** @class */ (function (_super) {
|
|
46750
46750
|
}
|
46751
46751
|
if (className === "RadioButton") {
|
46752
46752
|
var radioButton = entity;
|
46753
|
-
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_tabs_propertyGrids_gui_radioButtonPropertyGridComponent__WEBPACK_IMPORTED_MODULE_27__["RadioButtonPropertyGridComponent"], {
|
46753
|
+
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sharedUiComponents_tabs_propertyGrids_gui_radioButtonPropertyGridComponent__WEBPACK_IMPORTED_MODULE_27__["RadioButtonPropertyGridComponent"], { radioButtons: [radioButton], lockObject: this._lockObject, onPropertyChangedObservable: this.props.onPropertyChangedObservable }));
|
46754
46754
|
}
|
46755
46755
|
if (className === "Line") {
|
46756
46756
|
var line = entity;
|
@@ -60240,11 +60240,9 @@ var CanvasGraphComponent = function (props) {
|
|
60240
60240
|
"use strict";
|
60241
60241
|
__webpack_require__.r(__webpack_exports__);
|
60242
60242
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CanvasGraphService", function() { return CanvasGraphService; });
|
60243
|
-
/* harmony import */ var
|
60244
|
-
/* harmony import */ var
|
60245
|
-
/* harmony import */ var
|
60246
|
-
/* harmony import */ var _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_2__);
|
60247
|
-
|
60243
|
+
/* harmony import */ var _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./graphSupportingTypes */ "./components/graph/graphSupportingTypes.ts");
|
60244
|
+
/* harmony import */ var _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babylonjs/core/Maths/math.scalar */ "@babylonjs/core/Misc/observable");
|
60245
|
+
/* harmony import */ var _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__);
|
60248
60246
|
|
60249
60247
|
|
60250
60248
|
|
@@ -60300,6 +60298,8 @@ var drawThrottleTime = 15;
|
|
60300
60298
|
var maxXDistancePercBetweenLinePoints = 0.1;
|
60301
60299
|
// Color used to draw the rectangle that indicates no collection of data
|
60302
60300
|
var noDataRectangleColor = "#aaaaaa";
|
60301
|
+
var smoothingFactor = 0.2; // factor to smooth the graph with
|
60302
|
+
var rangeMargin = 0.1; // extra margin to expand the min/max range on the graph
|
60303
60303
|
/**
|
60304
60304
|
* This function will debounce calls to functions.
|
60305
60305
|
*
|
@@ -60403,7 +60403,7 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60403
60403
|
_this._position = null;
|
60404
60404
|
}
|
60405
60405
|
// Bind the zoom between [minZoom, maxZoom]
|
60406
|
-
_this._sizeOfWindow =
|
60406
|
+
_this._sizeOfWindow = _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["Scalar"].Clamp(_this._sizeOfWindow - amount, minZoom, maxZoom);
|
60407
60407
|
};
|
60408
60408
|
/**
|
60409
60409
|
* Initializes the panning object and attaches appropriate listener.
|
@@ -60438,7 +60438,7 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60438
60438
|
var itemsDelta = (pixelDelta / pixelsPerItem) | 0;
|
60439
60439
|
var pos = (_a = _this._position) !== null && _a !== void 0 ? _a : _this._getNumberOfSlices() - 1;
|
60440
60440
|
// update our position without allowing the user to pan more than they need to (approximation)
|
60441
|
-
_this._position =
|
60441
|
+
_this._position = _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["Scalar"].Clamp(pos - itemsDelta, Math.floor(_this._sizeOfWindow * scaleFactor), _this._getNumberOfSlices() - Math.floor(_this._sizeOfWindow * (1 - scaleFactor)));
|
60442
60442
|
if (itemsDelta === 0) {
|
60443
60443
|
_this._panPosition.delta += pixelDelta;
|
60444
60444
|
}
|
@@ -60573,7 +60573,7 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60573
60573
|
this._datasetBounds.end = this._getClosestPointToTimestamp(bufferMaximum) + 1;
|
60574
60574
|
// keep track of largest timestamp value in view!
|
60575
60575
|
this._globalTimeMinMax.max = Math.max(this.datasets.data.at(this.datasets.startingIndices.at(this._datasetBounds.end - 1)), this._globalTimeMinMax.max);
|
60576
|
-
var updatedScaleFactor =
|
60576
|
+
var updatedScaleFactor = _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["Scalar"].Clamp((this._globalTimeMinMax.max - this._globalTimeMinMax.min) / (bufferMaximum - this._globalTimeMinMax.min), scaleFactor, 1);
|
60577
60577
|
// we will now set the global maximum to the maximum of the buffer.
|
60578
60578
|
this._globalTimeMinMax.max = bufferMaximum;
|
60579
60579
|
this._drawableArea.top = 0;
|
@@ -60594,18 +60594,13 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60594
60594
|
var valueMinMax;
|
60595
60595
|
var prevPoint = _this._prevPointById.get(id);
|
60596
60596
|
var prevValue = _this._prevValueById.get(id);
|
60597
|
-
|
60597
|
+
var ticker = false;
|
60598
60598
|
for (var i = 0; i < _this._numberOfTickers; i++) {
|
60599
60599
|
if (_this._tickerItems[i].id === id) {
|
60600
|
-
|
60601
|
-
// Extend the min max range by 1% of its total range
|
60602
|
-
var delta = valueMinMax.max - valueMinMax.min;
|
60603
|
-
valueMinMax.min -= 0.01 * delta;
|
60604
|
-
valueMinMax.max += 0.01 * delta;
|
60600
|
+
ticker = true;
|
60605
60601
|
}
|
60606
60602
|
}
|
60607
|
-
|
60608
|
-
if (!valueMinMax) {
|
60603
|
+
if (!ticker) {
|
60609
60604
|
return;
|
60610
60605
|
}
|
60611
60606
|
ctx.beginPath();
|
@@ -60617,20 +60612,37 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60617
60612
|
else if (_this._preprocessedTooltipInfo.focusedId !== "") {
|
60618
60613
|
ctx.globalAlpha = backgroundLineAlpha;
|
60619
60614
|
}
|
60620
|
-
var
|
60615
|
+
var values = new Array(_this._datasetBounds.end - _this._datasetBounds.start);
|
60621
60616
|
for (var pointIndex = _this._datasetBounds.start; pointIndex < _this._datasetBounds.end; pointIndex++) {
|
60622
|
-
var numPoints = _this.datasets.data.at(_this.datasets.startingIndices.at(pointIndex) +
|
60617
|
+
var numPoints = _this.datasets.data.at(_this.datasets.startingIndices.at(pointIndex) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].NumberOfPointsOffset);
|
60623
60618
|
if (idOffset >= numPoints) {
|
60624
60619
|
continue;
|
60625
60620
|
}
|
60626
|
-
var valueIndex = _this.datasets.startingIndices.at(pointIndex) +
|
60627
|
-
var timestamp = _this.datasets.data.at(_this.datasets.startingIndices.at(pointIndex));
|
60621
|
+
var valueIndex = _this.datasets.startingIndices.at(pointIndex) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].SliceDataOffset + idOffset;
|
60628
60622
|
var value = _this.datasets.data.at(valueIndex);
|
60629
60623
|
if (prevValue === undefined) {
|
60630
60624
|
prevValue = value;
|
60631
60625
|
_this._prevValueById.set(id, prevValue);
|
60632
60626
|
}
|
60627
|
+
// perform smoothing
|
60633
60628
|
var smoothedValue = smoothingFactor * value + (1 - smoothingFactor) * prevValue;
|
60629
|
+
values[pointIndex - _this._datasetBounds.start] = smoothedValue;
|
60630
|
+
if (!valueMinMax) {
|
60631
|
+
valueMinMax = {
|
60632
|
+
min: smoothedValue,
|
60633
|
+
max: smoothedValue
|
60634
|
+
};
|
60635
|
+
}
|
60636
|
+
_this._prevValueById.set(id, smoothedValue);
|
60637
|
+
valueMinMax.min = Math.min(valueMinMax.min, smoothedValue);
|
60638
|
+
valueMinMax.max = Math.max(valueMinMax.max, smoothedValue);
|
60639
|
+
}
|
60640
|
+
var delta = valueMinMax.max - valueMinMax.min;
|
60641
|
+
valueMinMax.min -= rangeMargin * delta;
|
60642
|
+
valueMinMax.max += rangeMargin * delta;
|
60643
|
+
for (var pointIndex = _this._datasetBounds.start; pointIndex < _this._datasetBounds.end; pointIndex++) {
|
60644
|
+
var timestamp = _this.datasets.data.at(_this.datasets.startingIndices.at(pointIndex));
|
60645
|
+
var smoothedValue = values[pointIndex - _this._datasetBounds.start];
|
60634
60646
|
var drawableTime = _this._getPixelForNumber(timestamp, _this._globalTimeMinMax, left, right - left, false);
|
60635
60647
|
var drawableValue = _this._getPixelForNumber(smoothedValue, valueMinMax, top, bottom - top, true);
|
60636
60648
|
if (prevPoint === undefined) {
|
@@ -60651,7 +60663,6 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60651
60663
|
}
|
60652
60664
|
prevPoint[0] = drawableTime;
|
60653
60665
|
prevPoint[1] = drawableValue;
|
60654
|
-
_this._prevValueById.set(id, smoothedValue);
|
60655
60666
|
}
|
60656
60667
|
ctx.stroke();
|
60657
60668
|
});
|
@@ -60676,7 +60687,7 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60676
60687
|
return;
|
60677
60688
|
}
|
60678
60689
|
var valueMinMax = _this._getMinMax(bounds, idOffset);
|
60679
|
-
var latestValue = _this.datasets.data.at(_this.datasets.startingIndices.at(bounds.end - 1) +
|
60690
|
+
var latestValue = _this.datasets.data.at(_this.datasets.startingIndices.at(bounds.end - 1) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].SliceDataOffset + idOffset);
|
60680
60691
|
var text = "".concat(id, ": ").concat(latestValue.toFixed(2), " (max: ").concat(valueMinMax.max.toFixed(2), ", min: ").concat(valueMinMax.min.toFixed(2), ")");
|
60681
60692
|
valueMap.set(id, {
|
60682
60693
|
min: valueMinMax.min,
|
@@ -60795,16 +60806,16 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60795
60806
|
*/
|
60796
60807
|
CanvasGraphService.prototype._getTimestampUnit = function (timestamp) {
|
60797
60808
|
if (timestamp / msInHour > 1) {
|
60798
|
-
return
|
60809
|
+
return _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__["TimestampUnit"].Hours;
|
60799
60810
|
}
|
60800
60811
|
else if (timestamp / msInMinute > 1) {
|
60801
|
-
return
|
60812
|
+
return _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__["TimestampUnit"].Minutes;
|
60802
60813
|
}
|
60803
60814
|
else if (timestamp / msInSecond > 1) {
|
60804
|
-
return
|
60815
|
+
return _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__["TimestampUnit"].Seconds;
|
60805
60816
|
}
|
60806
60817
|
else {
|
60807
|
-
return
|
60818
|
+
return _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__["TimestampUnit"].Milliseconds;
|
60808
60819
|
}
|
60809
60820
|
};
|
60810
60821
|
/**
|
@@ -60815,19 +60826,19 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60815
60826
|
*/
|
60816
60827
|
CanvasGraphService.prototype._parseTimestamp = function (timestamp, intervalUnit) {
|
60817
60828
|
var parsedTimestamp = "";
|
60818
|
-
if (intervalUnit >=
|
60829
|
+
if (intervalUnit >= _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__["TimestampUnit"].Hours) {
|
60819
60830
|
var numHours = Math.floor(timestamp / msInHour);
|
60820
60831
|
timestamp -= numHours * msInHour;
|
60821
|
-
parsedTimestamp += "".concat(numHours.toString().padStart(intervalUnit >
|
60832
|
+
parsedTimestamp += "".concat(numHours.toString().padStart(intervalUnit > _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__["TimestampUnit"].Hours ? 2 : 1, "0"), ":");
|
60822
60833
|
}
|
60823
|
-
if (intervalUnit >=
|
60834
|
+
if (intervalUnit >= _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__["TimestampUnit"].Minutes) {
|
60824
60835
|
var numMinutes = Math.floor(timestamp / msInMinute);
|
60825
60836
|
timestamp -= numMinutes * msInMinute;
|
60826
|
-
parsedTimestamp += "".concat(numMinutes.toString().padStart(intervalUnit >
|
60837
|
+
parsedTimestamp += "".concat(numMinutes.toString().padStart(intervalUnit > _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__["TimestampUnit"].Minutes ? 2 : 1, "0"), ":");
|
60827
60838
|
}
|
60828
60839
|
var numSeconds = Math.floor(timestamp / msInSecond);
|
60829
60840
|
timestamp -= numSeconds * msInSecond;
|
60830
|
-
parsedTimestamp += numSeconds.toString().padStart(intervalUnit >
|
60841
|
+
parsedTimestamp += numSeconds.toString().padStart(intervalUnit > _graphSupportingTypes__WEBPACK_IMPORTED_MODULE_0__["TimestampUnit"].Seconds ? 2 : 1, "0");
|
60831
60842
|
if (timestamp > 0) {
|
60832
60843
|
if (parsedTimestamp.length > 0) {
|
60833
60844
|
parsedTimestamp += ".";
|
@@ -60906,11 +60917,11 @@ var CanvasGraphService = /** @class */ (function () {
|
|
60906
60917
|
CanvasGraphService.prototype._getMinMax = function (bounds, offset) {
|
60907
60918
|
var min = Infinity, max = 0;
|
60908
60919
|
for (var i = bounds.start; i < bounds.end; i++) {
|
60909
|
-
var numPoints = this.datasets.data.at(this.datasets.startingIndices.at(i) +
|
60920
|
+
var numPoints = this.datasets.data.at(this.datasets.startingIndices.at(i) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].NumberOfPointsOffset);
|
60910
60921
|
if (offset >= numPoints) {
|
60911
60922
|
continue;
|
60912
60923
|
}
|
60913
|
-
var itemIndex = this.datasets.startingIndices.at(i) +
|
60924
|
+
var itemIndex = this.datasets.startingIndices.at(i) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].SliceDataOffset + offset;
|
60914
60925
|
var item = this.datasets.data.at(itemIndex);
|
60915
60926
|
if (item < min) {
|
60916
60927
|
min = item;
|
@@ -61046,11 +61057,11 @@ var CanvasGraphService = /** @class */ (function () {
|
|
61046
61057
|
if (!!((_a = _this.metadata.get(id)) === null || _a === void 0 ? void 0 : _a.hidden)) {
|
61047
61058
|
return;
|
61048
61059
|
}
|
61049
|
-
var numPoints = _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex) +
|
61060
|
+
var numPoints = _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].NumberOfPointsOffset);
|
61050
61061
|
if (idOffset >= numPoints) {
|
61051
61062
|
return;
|
61052
61063
|
}
|
61053
|
-
var valueAtClosestPointIndex = _this.datasets.startingIndices.at(closestIndex) +
|
61064
|
+
var valueAtClosestPointIndex = _this.datasets.startingIndices.at(closestIndex) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].SliceDataOffset + idOffset;
|
61054
61065
|
var valueAtClosestPoint = _this.datasets.data.at(valueAtClosestPointIndex);
|
61055
61066
|
var valueMinMax;
|
61056
61067
|
// we would have already calculated the min and max while getting the tickers, so use those, and get first one.
|
@@ -61080,17 +61091,17 @@ var CanvasGraphService = /** @class */ (function () {
|
|
61080
61091
|
var distance = _this._getDistanceFromLine(xForActualTimestamp, valueAtClosestPointYPos, xForActualTimestamp, valueAtClosestPointYPos, pos.xPos - left, adjustedYPos);
|
61081
61092
|
// get the shortest distance between the point and the line segment infront, and line segment behind, store the shorter distance (if shorter than distance between closest data point and mouse).
|
61082
61093
|
if (closestIndex + 1 < _this.datasets.data.itemLength &&
|
61083
|
-
_this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex + 1) +
|
61094
|
+
_this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex + 1) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].NumberOfPointsOffset) > idOffset) {
|
61084
61095
|
var secondPointTimestamp = _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex + 1));
|
61085
61096
|
var secondPointX = _this._getPixelForNumber(secondPointTimestamp, _this._globalTimeMinMax, drawableArea.left, drawableArea.right - drawableArea.left, false);
|
61086
|
-
var secondPointValue = _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex + 1) +
|
61097
|
+
var secondPointValue = _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex + 1) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].SliceDataOffset + idOffset);
|
61087
61098
|
var secondPointY = _this._getPixelForNumber(secondPointValue, valueMinMax, drawableArea.top, drawableArea.bottom - drawableArea.top, true);
|
61088
61099
|
distance = Math.min(_this._getDistanceFromLine(xForActualTimestamp, valueAtClosestPointYPos, secondPointX, secondPointY, pos.xPos - left, adjustedYPos), distance);
|
61089
61100
|
}
|
61090
|
-
if (closestIndex - 1 >= 0 && _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex + 1) +
|
61101
|
+
if (closestIndex - 1 >= 0 && _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex + 1) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].NumberOfPointsOffset) > idOffset) {
|
61091
61102
|
var secondPointTimestamp = _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex - 1));
|
61092
61103
|
var secondPointX = _this._getPixelForNumber(secondPointTimestamp, _this._globalTimeMinMax, drawableArea.left, drawableArea.right - drawableArea.left, false);
|
61093
|
-
var secondPointValue = _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex - 1) +
|
61104
|
+
var secondPointValue = _this.datasets.data.at(_this.datasets.startingIndices.at(closestIndex - 1) + _babylonjs_core_Maths_math_scalar__WEBPACK_IMPORTED_MODULE_1__["PerformanceViewerCollector"].SliceDataOffset + idOffset);
|
61094
61105
|
var secondPointY = _this._getPixelForNumber(secondPointValue, valueMinMax, drawableArea.top, drawableArea.bottom - drawableArea.top, true);
|
61095
61106
|
distance = Math.min(_this._getDistanceFromLine(xForActualTimestamp, valueAtClosestPointYPos, secondPointX, secondPointY, pos.xPos - left, adjustedYPos), distance);
|
61096
61107
|
}
|
@@ -64769,6 +64780,9 @@ var ColorPicker = /** @class */ (function (_super) {
|
|
64769
64780
|
}
|
64770
64781
|
var hsv = this.state.color.toHSV();
|
64771
64782
|
_babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color3"].HSVtoRGBToRef(hsv.r, saturation, value, this.state.color);
|
64783
|
+
if (this.state.alpha === 0) {
|
64784
|
+
this.setState({ alpha: 1 });
|
64785
|
+
}
|
64772
64786
|
this.setState({ color: this.state.color });
|
64773
64787
|
};
|
64774
64788
|
ColorPicker.prototype._evaluateHue = function (evt) {
|
@@ -64822,6 +64836,7 @@ var ColorPicker = /** @class */ (function (_super) {
|
|
64822
64836
|
left: "".concat((hsv.r / 360.0) * 100, "%"),
|
64823
64837
|
border: "1px solid " + colorHexRef,
|
64824
64838
|
} }))),
|
64839
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color-picker-alpha" }),
|
64825
64840
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color-picker-rgb" },
|
64826
64841
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "red" },
|
64827
64842
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_colorComponentEntry__WEBPACK_IMPORTED_MODULE_3__["ColorComponentEntry"], { label: "R", min: 0, max: 255, value: Math.round(this.state.color.r * 255), onChange: function (value) {
|
@@ -64993,6 +65008,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
64993
65008
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
64994
65009
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
64995
65010
|
/* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @fortawesome/react-fontawesome */ "../../../../node_modules/@fortawesome/react-fontawesome/index.es.js");
|
65011
|
+
/* harmony import */ var _targetsProxy__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./targetsProxy */ "./sharedUiComponents/lines/targetsProxy.tsx");
|
65012
|
+
|
64996
65013
|
|
64997
65014
|
|
64998
65015
|
|
@@ -65003,10 +65020,10 @@ var CheckBoxLineComponent = /** @class */ (function (_super) {
|
|
65003
65020
|
_this._localChange = false;
|
65004
65021
|
_this._uniqueId = CheckBoxLineComponent._UniqueIdSeed++;
|
65005
65022
|
if (_this.props.isSelected) {
|
65006
|
-
_this.state = { isSelected: _this.props.isSelected() };
|
65023
|
+
_this.state = { isSelected: _this.props.isSelected(), isConflict: false };
|
65007
65024
|
}
|
65008
65025
|
else {
|
65009
|
-
_this.state = { isSelected: _this.props.target[_this.props.propertyName]
|
65026
|
+
_this.state = { isSelected: _this.props.target[_this.props.propertyName] === true, isConflict: _this.props.target[_this.props.propertyName] === _targetsProxy__WEBPACK_IMPORTED_MODULE_3__["conflictingValuesPlaceholder"] };
|
65010
65027
|
}
|
65011
65028
|
if (_this.props.disabled) {
|
65012
65029
|
_this.state = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, _this.state), { isDisabled: _this.props.disabled });
|
@@ -65019,7 +65036,10 @@ var CheckBoxLineComponent = /** @class */ (function (_super) {
|
|
65019
65036
|
currentState = nextProps.isSelected();
|
65020
65037
|
}
|
65021
65038
|
else {
|
65022
|
-
currentState = nextProps.target[nextProps.propertyName]
|
65039
|
+
currentState = nextProps.target[nextProps.propertyName] === true;
|
65040
|
+
if (nextProps.target[nextProps.propertyName] === _targetsProxy__WEBPACK_IMPORTED_MODULE_3__["conflictingValuesPlaceholder"]) {
|
65041
|
+
nextState.isConflict = true;
|
65042
|
+
}
|
65023
65043
|
}
|
65024
65044
|
if (currentState !== nextState.isSelected || this._localChange) {
|
65025
65045
|
nextState.isSelected = currentState;
|
@@ -65029,7 +65049,7 @@ var CheckBoxLineComponent = /** @class */ (function (_super) {
|
|
65029
65049
|
if (nextProps.disabled !== nextState.isDisabled) {
|
65030
65050
|
return true;
|
65031
65051
|
}
|
65032
|
-
return nextProps.label !== this.props.label || nextProps.target !== this.props.target;
|
65052
|
+
return nextProps.label !== this.props.label || nextProps.target !== this.props.target || nextState.isConflict !== this.state.isConflict;
|
65033
65053
|
};
|
65034
65054
|
CheckBoxLineComponent.prototype.onChange = function () {
|
65035
65055
|
this._localChange = true;
|
@@ -65050,7 +65070,7 @@ var CheckBoxLineComponent = /** @class */ (function (_super) {
|
|
65050
65070
|
if (this.props.onValueChanged) {
|
65051
65071
|
this.props.onValueChanged();
|
65052
65072
|
}
|
65053
|
-
this.setState({ isSelected: !this.state.isSelected });
|
65073
|
+
this.setState({ isSelected: !this.state.isSelected, isConflict: false });
|
65054
65074
|
};
|
65055
65075
|
CheckBoxLineComponent.prototype.render = function () {
|
65056
65076
|
var _this = this;
|
@@ -65060,7 +65080,7 @@ var CheckBoxLineComponent = /** @class */ (function (_super) {
|
|
65060
65080
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "label", title: this.props.iconLabel }, this.props.label),
|
65061
65081
|
this.props.faIcons && react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_2__["FontAwesomeIcon"], { className: "cbx ".concat(this.props.disabled ? "disabled" : ""), icon: this.state.isSelected ? this.props.faIcons.enabled : this.props.faIcons.disabled, onClick: function () { return !_this.props.disabled && _this.onChange(); } }),
|
65062
65082
|
!this.props.faIcons && react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "checkBox" },
|
65063
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("input", { type: "checkbox", id: "checkbox" + this._uniqueId, className: "cbx hidden", checked: this.state.isSelected, onChange: function () { return _this.onChange(); }, disabled: !!this.props.disabled }),
|
65083
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("input", { type: "checkbox", id: "checkbox" + this._uniqueId, className: "cbx hidden ".concat(this.state.isConflict ? "conflict" : ""), checked: this.state.isSelected, onChange: function () { return _this.onChange(); }, disabled: !!this.props.disabled }),
|
65064
65084
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("label", { htmlFor: "checkbox" + this._uniqueId, className: "lbl".concat(!!this.props.disabled ? " disabled" : "") }))));
|
65065
65085
|
};
|
65066
65086
|
CheckBoxLineComponent._UniqueIdSeed = 0;
|
@@ -65084,195 +65104,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
65084
65104
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
65085
65105
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
65086
65106
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
65087
|
-
/* harmony import */ var
|
65088
|
-
/* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @fortawesome/react-fontawesome */ "../../../../node_modules/@fortawesome/react-fontawesome/index.es.js");
|
65089
|
-
/* harmony import */ var _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @fortawesome/free-solid-svg-icons */ "../../../../node_modules/@fortawesome/free-solid-svg-icons/index.es.js");
|
65090
|
-
/* harmony import */ var _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babylonjs/core/Maths/math.color */ "@babylonjs/core/Misc/observable");
|
65091
|
-
/* harmony import */ var _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_5__);
|
65092
|
-
/* harmony import */ var _colorPickerComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./colorPickerComponent */ "./sharedUiComponents/lines/colorPickerComponent.tsx");
|
65093
|
-
/* harmony import */ var _textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./textInputLineComponent */ "./sharedUiComponents/lines/textInputLineComponent.tsx");
|
65094
|
-
|
65095
|
-
|
65096
|
-
|
65097
|
-
|
65098
|
-
|
65107
|
+
/* harmony import */ var _colorLineComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./colorLineComponent */ "./sharedUiComponents/lines/colorLineComponent.tsx");
|
65099
65108
|
|
65100
65109
|
|
65101
65110
|
|
65102
|
-
var copyIcon = __webpack_require__(/*! ./copy.svg */ "./sharedUiComponents/lines/copy.svg");
|
65103
65111
|
var Color3LineComponent = /** @class */ (function (_super) {
|
65104
65112
|
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Color3LineComponent, _super);
|
65105
|
-
function Color3LineComponent(
|
65106
|
-
|
65107
|
-
_this._localChange = false;
|
65108
|
-
var typeName = typeof _this.props.target[_this.props.propertyName];
|
65109
|
-
if (typeName === "string") {
|
65110
|
-
var colorConverted = _this.convertToColor3(_this.props.target[_this.props.propertyName]);
|
65111
|
-
_this.state = { isExpanded: false, color: colorConverted, colorText: _this.props.target[_this.props.propertyName] };
|
65112
|
-
}
|
65113
|
-
else {
|
65114
|
-
_this.state = { isExpanded: false, color: _this.props.target[_this.props.propertyName].clone(), colorText: _this.props.target[_this.props.propertyName].toHexString() };
|
65115
|
-
}
|
65116
|
-
if (props.isLinear) {
|
65117
|
-
_this.state.color.toGammaSpaceToRef(_this.state.color);
|
65118
|
-
}
|
65119
|
-
props.target._isLinearColor = props.isLinear; // so that replayRecorder can append toLinearSpace() as appropriate
|
65120
|
-
_this._colorPickerOpen = false;
|
65121
|
-
return _this;
|
65113
|
+
function Color3LineComponent() {
|
65114
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
65122
65115
|
}
|
65123
|
-
Color3LineComponent.prototype.convertToColor3 = function (color) {
|
65124
|
-
if (color === "" || color === "transparent") {
|
65125
|
-
return new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_5__["Color4"](0, 0, 0, 0);
|
65126
|
-
}
|
65127
|
-
if (color.substring(0, 1) !== "#" || color.length !== 7) {
|
65128
|
-
var d = document.createElement("div");
|
65129
|
-
d.style.color = color;
|
65130
|
-
document.body.append(d);
|
65131
|
-
var rgb = window.getComputedStyle(d).color;
|
65132
|
-
document.body.removeChild(d);
|
65133
|
-
var rgbArray = rgb
|
65134
|
-
.substring(4, rgb.length - 1)
|
65135
|
-
.replace(/ /g, "")
|
65136
|
-
.split(",");
|
65137
|
-
return new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_5__["Color3"](parseInt(rgbArray[0]) / 255, parseInt(rgbArray[1]) / 255, parseInt(rgbArray[2]) / 255);
|
65138
|
-
}
|
65139
|
-
return _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_5__["Color3"].FromHexString(color);
|
65140
|
-
};
|
65141
|
-
Color3LineComponent.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
65142
|
-
var isString = typeof this.props.target[this.props.propertyName] === "string";
|
65143
|
-
var currentState = isString
|
65144
|
-
? this.convertToColor3(nextProps.target[nextProps.propertyName])
|
65145
|
-
: this.props.isLinear
|
65146
|
-
? nextProps.target[nextProps.propertyName].toGammaSpace()
|
65147
|
-
: nextProps.target[nextProps.propertyName];
|
65148
|
-
if (!currentState.equals(nextState.color) || this._localChange) {
|
65149
|
-
nextState.color = currentState.clone();
|
65150
|
-
nextState.colorText = isString ? nextProps.target[nextProps.propertyName] : nextProps.target[nextProps.propertyName].toHexString();
|
65151
|
-
this._localChange = false;
|
65152
|
-
return true;
|
65153
|
-
}
|
65154
|
-
return false;
|
65155
|
-
};
|
65156
|
-
Color3LineComponent.prototype.setPropertyValue = function (newColor, newColorText) {
|
65157
|
-
var isString = typeof this.props.target[this.props.propertyName] === "string";
|
65158
|
-
if (isString) {
|
65159
|
-
this.props.target[this.props.propertyName] = newColorText;
|
65160
|
-
}
|
65161
|
-
else {
|
65162
|
-
this.props.target[this.props.propertyName] = newColor;
|
65163
|
-
if (this.props.isLinear) {
|
65164
|
-
this.props.target[this.props.propertyName] = newColor.toLinearSpace();
|
65165
|
-
}
|
65166
|
-
}
|
65167
|
-
};
|
65168
|
-
Color3LineComponent.prototype.onChange = function (newValue) {
|
65169
|
-
this._localChange = true;
|
65170
|
-
var newColor = this.convertToColor3(newValue);
|
65171
|
-
if (this._colorPickerOpen && this.props.icon) {
|
65172
|
-
var savedColor = this.convertToColor3(this._colorStringSaved);
|
65173
|
-
if (savedColor.equals(newColor)) {
|
65174
|
-
newValue = this._colorStringSaved;
|
65175
|
-
}
|
65176
|
-
}
|
65177
|
-
if (this.props.onPropertyChangedObservable) {
|
65178
|
-
this.props.onPropertyChangedObservable.notifyObservers({
|
65179
|
-
object: this.props.target,
|
65180
|
-
property: this.props.propertyName,
|
65181
|
-
value: newColor,
|
65182
|
-
initialValue: this.state.color,
|
65183
|
-
});
|
65184
|
-
}
|
65185
|
-
this.setPropertyValue(newColor, newValue);
|
65186
|
-
this.setState({ color: newColor, colorText: newValue });
|
65187
|
-
if (this.props.onValueChange) {
|
65188
|
-
this.props.onValueChange(newValue);
|
65189
|
-
}
|
65190
|
-
};
|
65191
|
-
Color3LineComponent.prototype.switchExpandState = function () {
|
65192
|
-
this._localChange = true;
|
65193
|
-
this.setState({ isExpanded: !this.state.isExpanded });
|
65194
|
-
};
|
65195
|
-
Color3LineComponent.prototype.raiseOnPropertyChanged = function (previousValue) {
|
65196
|
-
if (!this.props.onPropertyChangedObservable) {
|
65197
|
-
return;
|
65198
|
-
}
|
65199
|
-
this.props.onPropertyChangedObservable.notifyObservers({
|
65200
|
-
object: this.props.target,
|
65201
|
-
property: this.props.propertyName,
|
65202
|
-
value: this.state.color,
|
65203
|
-
initialValue: previousValue,
|
65204
|
-
});
|
65205
|
-
};
|
65206
|
-
Color3LineComponent.prototype.updateStateR = function (value) {
|
65207
|
-
this._localChange = true;
|
65208
|
-
var store = this.state.color.clone();
|
65209
|
-
this.state.color.r = value;
|
65210
|
-
var hex = this.state.color.toHexString();
|
65211
|
-
this.setPropertyValue(this.state.color, hex);
|
65212
|
-
this.setState({ color: this.state.color, colorText: hex });
|
65213
|
-
this.raiseOnPropertyChanged(store);
|
65214
|
-
};
|
65215
|
-
Color3LineComponent.prototype.updateStateG = function (value) {
|
65216
|
-
this._localChange = true;
|
65217
|
-
var store = this.state.color.clone();
|
65218
|
-
this.state.color.g = value;
|
65219
|
-
var hex = this.state.color.toHexString();
|
65220
|
-
this.setPropertyValue(this.state.color, hex);
|
65221
|
-
this.setState({ color: this.state.color, colorText: hex });
|
65222
|
-
this.raiseOnPropertyChanged(store);
|
65223
|
-
};
|
65224
|
-
Color3LineComponent.prototype.updateStateB = function (value) {
|
65225
|
-
this._localChange = true;
|
65226
|
-
var store = this.state.color.clone();
|
65227
|
-
this.state.color.b = value;
|
65228
|
-
var hex = this.state.color.toHexString();
|
65229
|
-
this.setPropertyValue(this.state.color, hex);
|
65230
|
-
this.setState({ color: this.state.color, colorText: hex });
|
65231
|
-
this.raiseOnPropertyChanged(store);
|
65232
|
-
};
|
65233
|
-
Color3LineComponent.prototype.copyToClipboard = function () {
|
65234
|
-
var element = document.createElement("div");
|
65235
|
-
element.textContent = this.state.color.toHexString();
|
65236
|
-
document.body.appendChild(element);
|
65237
|
-
if (window.getSelection) {
|
65238
|
-
var range = document.createRange();
|
65239
|
-
range.selectNode(element);
|
65240
|
-
window.getSelection().removeAllRanges();
|
65241
|
-
window.getSelection().addRange(range);
|
65242
|
-
}
|
65243
|
-
document.execCommand("copy");
|
65244
|
-
element.remove();
|
65245
|
-
};
|
65246
|
-
Color3LineComponent.prototype.convert = function (colorString) {
|
65247
|
-
this.onChange(this._colorString);
|
65248
|
-
};
|
65249
65116
|
Color3LineComponent.prototype.render = function () {
|
65250
|
-
var
|
65251
|
-
|
65252
|
-
this._colorString = this.state.colorText;
|
65253
|
-
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color3Line" },
|
65254
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "firstLine", title: this.props.label },
|
65255
|
-
this.props.icon && react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, className: "icon" }),
|
65256
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "label" }, this.props.label),
|
65257
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color3" },
|
65258
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_colorPickerComponent__WEBPACK_IMPORTED_MODULE_6__["ColorPickerLineComponent"], { linearHint: this.props.isLinear, value: this.state.color, onColorChanged: function (color) {
|
65259
|
-
if (!_this._colorPickerOpen) {
|
65260
|
-
_this._colorStringSaved = _this._colorString;
|
65261
|
-
}
|
65262
|
-
_this._colorPickerOpen = true;
|
65263
|
-
_this.onChange(color);
|
65264
|
-
} })),
|
65265
|
-
this.props.icon && this.props.lockObject && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "", target: this, propertyName: "_colorString", onChange: function (newValue) {
|
65266
|
-
_this._colorPickerOpen = false;
|
65267
|
-
_this.convert(newValue);
|
65268
|
-
}, onPropertyChangedObservable: this.props.onPropertyChangedObservable })),
|
65269
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "copy hoverIcon", onClick: function () { return _this.copyToClipboard(); }, title: "Copy to clipboard" },
|
65270
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("img", { src: copyIcon, alt: "" })),
|
65271
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "expand hoverIcon", onClick: function () { return _this.switchExpandState(); }, title: "Expand" }, chevron)),
|
65272
|
-
this.state.isExpanded && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "secondLine" },
|
65273
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__["NumericInputComponent"], { label: "r", value: this.state.color.r, onChange: function (value) { return _this.updateStateR(value); } }),
|
65274
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__["NumericInputComponent"], { label: "g", value: this.state.color.g, onChange: function (value) { return _this.updateStateG(value); } }),
|
65275
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_numericInputComponent__WEBPACK_IMPORTED_MODULE_2__["NumericInputComponent"], { label: "b", value: this.state.color.b, onChange: function (value) { return _this.updateStateB(value); } })))));
|
65117
|
+
var props = this.props;
|
65118
|
+
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_colorLineComponent__WEBPACK_IMPORTED_MODULE_2__["ColorLineComponent"], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ disableAlpha: true }, props));
|
65276
65119
|
};
|
65277
65120
|
return Color3LineComponent;
|
65278
65121
|
}(react__WEBPACK_IMPORTED_MODULE_1__["Component"]));
|
@@ -65294,12 +65137,49 @@ __webpack_require__.r(__webpack_exports__);
|
|
65294
65137
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
65295
65138
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
65296
65139
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
65140
|
+
/* harmony import */ var _colorLineComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./colorLineComponent */ "./sharedUiComponents/lines/colorLineComponent.tsx");
|
65141
|
+
|
65142
|
+
|
65143
|
+
|
65144
|
+
var Color4LineComponent = /** @class */ (function (_super) {
|
65145
|
+
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(Color4LineComponent, _super);
|
65146
|
+
function Color4LineComponent() {
|
65147
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
65148
|
+
}
|
65149
|
+
Color4LineComponent.prototype.render = function () {
|
65150
|
+
var props = this.props;
|
65151
|
+
return react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_colorLineComponent__WEBPACK_IMPORTED_MODULE_2__["ColorLineComponent"], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, props));
|
65152
|
+
};
|
65153
|
+
return Color4LineComponent;
|
65154
|
+
}(react__WEBPACK_IMPORTED_MODULE_1__["Component"]));
|
65155
|
+
|
65156
|
+
|
65157
|
+
|
65158
|
+
/***/ }),
|
65159
|
+
|
65160
|
+
/***/ "./sharedUiComponents/lines/colorLineComponent.tsx":
|
65161
|
+
/*!*********************************************************!*\
|
65162
|
+
!*** ./sharedUiComponents/lines/colorLineComponent.tsx ***!
|
65163
|
+
\*********************************************************/
|
65164
|
+
/*! exports provided: ColorLineComponent */
|
65165
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
65166
|
+
|
65167
|
+
"use strict";
|
65168
|
+
__webpack_require__.r(__webpack_exports__);
|
65169
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ColorLineComponent", function() { return ColorLineComponent; });
|
65170
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
65171
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
65172
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
65297
65173
|
/* harmony import */ var _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babylonjs/core/Maths/math.color */ "@babylonjs/core/Misc/observable");
|
65298
65174
|
/* harmony import */ var _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__);
|
65299
|
-
/* harmony import */ var
|
65175
|
+
/* harmony import */ var _numericInputComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./numericInputComponent */ "./sharedUiComponents/lines/numericInputComponent.tsx");
|
65300
65176
|
/* harmony import */ var _fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @fortawesome/react-fontawesome */ "../../../../node_modules/@fortawesome/react-fontawesome/index.es.js");
|
65301
65177
|
/* harmony import */ var _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @fortawesome/free-solid-svg-icons */ "../../../../node_modules/@fortawesome/free-solid-svg-icons/index.es.js");
|
65302
65178
|
/* harmony import */ var _colorPickerComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./colorPickerComponent */ "./sharedUiComponents/lines/colorPickerComponent.tsx");
|
65179
|
+
/* harmony import */ var _textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./textInputLineComponent */ "./sharedUiComponents/lines/textInputLineComponent.tsx");
|
65180
|
+
/* harmony import */ var _targetsProxy__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./targetsProxy */ "./sharedUiComponents/lines/targetsProxy.tsx");
|
65181
|
+
|
65182
|
+
|
65303
65183
|
|
65304
65184
|
|
65305
65185
|
|
@@ -65308,105 +65188,128 @@ __webpack_require__.r(__webpack_exports__);
|
|
65308
65188
|
|
65309
65189
|
|
65310
65190
|
var copyIcon = __webpack_require__(/*! ./copy.svg */ "./sharedUiComponents/lines/copy.svg");
|
65311
|
-
var
|
65312
|
-
|
65313
|
-
|
65191
|
+
var emptyColor = new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color4"](0, 0, 0, 0);
|
65192
|
+
var ColorLineComponent = /** @class */ (function (_super) {
|
65193
|
+
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ColorLineComponent, _super);
|
65194
|
+
function ColorLineComponent(props) {
|
65314
65195
|
var _this = _super.call(this, props) || this;
|
65315
|
-
|
65316
|
-
var
|
65317
|
-
|
65318
|
-
_this.state = { isExpanded: false, color: currentColor };
|
65196
|
+
var colorString = _this.getValueAsString();
|
65197
|
+
var color = _this.getValue();
|
65198
|
+
_this.state = { isExpanded: false, color: color, colorString: colorString };
|
65319
65199
|
if (props.isLinear) {
|
65320
65200
|
_this.state.color.toGammaSpaceToRef(_this.state.color);
|
65321
65201
|
}
|
65322
|
-
|
65202
|
+
var target = _this.props.target;
|
65203
|
+
target._isLinearColor = props.isLinear; // so that replayRecorder can append toLinearSpace() as appropriate
|
65323
65204
|
return _this;
|
65324
65205
|
}
|
65325
|
-
|
65326
|
-
var
|
65327
|
-
var
|
65328
|
-
|
65329
|
-
|
65206
|
+
ColorLineComponent.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
65207
|
+
var stateString = nextState.colorString;
|
65208
|
+
var stateColor = nextState.color;
|
65209
|
+
var propsString = this.getValueAsString(nextProps);
|
65210
|
+
var propsColor = this.getValue(nextProps);
|
65211
|
+
if (stateString !== this.state.colorString || stateColor !== this.state.color) {
|
65212
|
+
nextState.colorString = stateString;
|
65213
|
+
nextState.color = stateColor;
|
65214
|
+
return true;
|
65330
65215
|
}
|
65331
|
-
if (
|
65332
|
-
nextState.
|
65333
|
-
|
65216
|
+
if (propsString !== this.state.colorString || propsColor !== this.state.color) {
|
65217
|
+
nextState.colorString = propsString;
|
65218
|
+
nextState.color = propsColor;
|
65219
|
+
return true;
|
65220
|
+
}
|
65221
|
+
if (nextState.isExpanded !== this.state.isExpanded) {
|
65334
65222
|
return true;
|
65335
65223
|
}
|
65336
65224
|
return false;
|
65337
65225
|
};
|
65338
|
-
|
65339
|
-
|
65226
|
+
ColorLineComponent.prototype.getValue = function (props) {
|
65227
|
+
if (props === void 0) { props = this.props; }
|
65228
|
+
var target = props.target;
|
65229
|
+
var property = target[props.propertyName];
|
65230
|
+
if (!property)
|
65231
|
+
return emptyColor;
|
65232
|
+
if (typeof property === "string") {
|
65233
|
+
if (property === _targetsProxy__WEBPACK_IMPORTED_MODULE_8__["conflictingValuesPlaceholder"]) {
|
65234
|
+
return emptyColor;
|
65235
|
+
}
|
65236
|
+
return this.convertToColor(property);
|
65237
|
+
}
|
65238
|
+
else {
|
65239
|
+
return property;
|
65240
|
+
}
|
65241
|
+
};
|
65242
|
+
ColorLineComponent.prototype.getValueAsString = function (props) {
|
65243
|
+
if (props === void 0) { props = this.props; }
|
65244
|
+
var target = props.target;
|
65245
|
+
var property = target[props.propertyName];
|
65246
|
+
if (!property)
|
65247
|
+
return "";
|
65248
|
+
if (typeof property === "string") {
|
65249
|
+
return property;
|
65250
|
+
}
|
65251
|
+
else {
|
65252
|
+
return property.toHexString();
|
65253
|
+
}
|
65254
|
+
};
|
65255
|
+
ColorLineComponent.prototype.setColorFromString = function (colorString) {
|
65256
|
+
if (colorString === _targetsProxy__WEBPACK_IMPORTED_MODULE_8__["conflictingValuesPlaceholder"])
|
65257
|
+
return;
|
65258
|
+
var color = this.convertToColor(colorString);
|
65340
65259
|
if (this.props.isLinear) {
|
65341
|
-
|
65260
|
+
color = color.toLinearSpace();
|
65342
65261
|
}
|
65262
|
+
this.updateColor(color);
|
65263
|
+
this.setState({ color: color, colorString: colorString });
|
65343
65264
|
};
|
65344
|
-
|
65345
|
-
this.
|
65346
|
-
|
65265
|
+
ColorLineComponent.prototype.setColor = function (color) {
|
65266
|
+
if (this.props.isLinear) {
|
65267
|
+
color = color.toLinearSpace();
|
65268
|
+
}
|
65269
|
+
this.updateColor(color);
|
65270
|
+
var colorString = this.props.disableAlpha ? this.toColor3(color).toHexString() : color.toHexString();
|
65271
|
+
this.setState({ color: color, colorString: colorString });
|
65272
|
+
};
|
65273
|
+
ColorLineComponent.prototype.updateColor = function (newColor) {
|
65274
|
+
// whether to set properties to color3 or color4
|
65275
|
+
var setColor = this.props.disableAlpha ? this.toColor3(newColor) : newColor;
|
65276
|
+
var target = this.props.target;
|
65277
|
+
var initialValue = target[this.props.propertyName];
|
65278
|
+
var value = typeof target[this.props.propertyName] === "string" ? setColor.toHexString() : setColor;
|
65279
|
+
// make the change
|
65280
|
+
target[this.props.propertyName] = value;
|
65281
|
+
// notify observers
|
65347
65282
|
if (this.props.onPropertyChangedObservable) {
|
65348
65283
|
this.props.onPropertyChangedObservable.notifyObservers({
|
65349
|
-
object:
|
65284
|
+
object: target,
|
65350
65285
|
property: this.props.propertyName,
|
65351
|
-
value:
|
65352
|
-
initialValue:
|
65286
|
+
value: value,
|
65287
|
+
initialValue: initialValue
|
65353
65288
|
});
|
65354
65289
|
}
|
65355
|
-
this.setPropertyValue(newColor);
|
65356
|
-
this.setState({ color: newColor });
|
65357
65290
|
if (this.props.onChange) {
|
65358
65291
|
this.props.onChange();
|
65359
65292
|
}
|
65360
65293
|
};
|
65361
|
-
|
65362
|
-
this._localChange = true;
|
65294
|
+
ColorLineComponent.prototype.switchExpandState = function () {
|
65363
65295
|
this.setState({ isExpanded: !this.state.isExpanded });
|
65364
65296
|
};
|
65365
|
-
|
65366
|
-
|
65367
|
-
return;
|
65368
|
-
}
|
65369
|
-
this.props.onPropertyChangedObservable.notifyObservers({
|
65370
|
-
object: this.props.target,
|
65371
|
-
property: this.props.propertyName,
|
65372
|
-
value: this.state.color,
|
65373
|
-
initialValue: previousValue,
|
65374
|
-
});
|
65297
|
+
ColorLineComponent.prototype.updateStateR = function (value) {
|
65298
|
+
this.setColor(new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color4"](value, this.state.color.g, this.state.color.b, this.state.color.a));
|
65375
65299
|
};
|
65376
|
-
|
65377
|
-
this.
|
65378
|
-
var store = this.state.color.clone();
|
65379
|
-
this.state.color.r = value;
|
65380
|
-
this.setPropertyValue(this.state.color);
|
65381
|
-
this.setState({ color: this.state.color });
|
65382
|
-
this.raiseOnPropertyChanged(store);
|
65300
|
+
ColorLineComponent.prototype.updateStateG = function (value) {
|
65301
|
+
this.setColor(new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color4"](this.state.color.r, value, this.state.color.b, this.state.color.a));
|
65383
65302
|
};
|
65384
|
-
|
65385
|
-
this.
|
65386
|
-
var store = this.state.color.clone();
|
65387
|
-
this.state.color.g = value;
|
65388
|
-
this.setPropertyValue(this.state.color);
|
65389
|
-
this.setState({ color: this.state.color });
|
65390
|
-
this.raiseOnPropertyChanged(store);
|
65391
|
-
};
|
65392
|
-
Color4LineComponent.prototype.updateStateB = function (value) {
|
65393
|
-
this._localChange = true;
|
65394
|
-
var store = this.state.color.clone();
|
65395
|
-
this.state.color.b = value;
|
65396
|
-
this.setPropertyValue(this.state.color);
|
65397
|
-
this.setState({ color: this.state.color });
|
65398
|
-
this.raiseOnPropertyChanged(store);
|
65303
|
+
ColorLineComponent.prototype.updateStateB = function (value) {
|
65304
|
+
this.setColor(new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color4"](this.state.color.r, this.state.color.g, value, this.state.color.a));
|
65399
65305
|
};
|
65400
|
-
|
65401
|
-
this.
|
65402
|
-
|
65403
|
-
|
65404
|
-
this.state.color.
|
65405
|
-
this.props.target[this.props.propertyName] = this.state.color;
|
65406
|
-
this.setState({ color: this.state.color });
|
65407
|
-
this.raiseOnPropertyChanged(store);
|
65306
|
+
ColorLineComponent.prototype.updateStateA = function (value) {
|
65307
|
+
if (this.props.disableAlpha) {
|
65308
|
+
return;
|
65309
|
+
}
|
65310
|
+
this.setColor(new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color4"](this.state.color.r, this.state.color.g, this.state.color.b, value));
|
65408
65311
|
};
|
65409
|
-
|
65312
|
+
ColorLineComponent.prototype.copyToClipboard = function () {
|
65410
65313
|
var element = document.createElement("div");
|
65411
65314
|
element.textContent = this.state.color.toHexString();
|
65412
65315
|
document.body.appendChild(element);
|
@@ -65419,7 +65322,41 @@ var Color4LineComponent = /** @class */ (function (_super) {
|
|
65419
65322
|
document.execCommand("copy");
|
65420
65323
|
element.remove();
|
65421
65324
|
};
|
65422
|
-
|
65325
|
+
Object.defineProperty(ColorLineComponent.prototype, "colorString", {
|
65326
|
+
get: function () {
|
65327
|
+
return this.state.colorString;
|
65328
|
+
},
|
65329
|
+
set: function (_) { },
|
65330
|
+
enumerable: false,
|
65331
|
+
configurable: true
|
65332
|
+
});
|
65333
|
+
ColorLineComponent.prototype.convertToColor = function (color) {
|
65334
|
+
if (color === "" || color === "transparent") {
|
65335
|
+
return emptyColor;
|
65336
|
+
}
|
65337
|
+
if (color.substring(0, 1) !== "#" || (color.length !== 7 && color.length !== 9)) {
|
65338
|
+
var d = document.createElement("div");
|
65339
|
+
d.style.color = color;
|
65340
|
+
document.body.append(d);
|
65341
|
+
var rgb = window.getComputedStyle(d).color;
|
65342
|
+
document.body.removeChild(d);
|
65343
|
+
var rgbArray = rgb
|
65344
|
+
.substring(4, rgb.length - 1)
|
65345
|
+
.replace(/ /g, "")
|
65346
|
+
.split(",");
|
65347
|
+
var alpha = rgbArray.length > 3 ? parseInt(rgbArray[3]) / 255 : 1.0;
|
65348
|
+
return new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color4"](parseInt(rgbArray[0]) / 255, parseInt(rgbArray[1]) / 255, parseInt(rgbArray[2]) / 255, alpha);
|
65349
|
+
}
|
65350
|
+
if (this.props.disableAlpha) {
|
65351
|
+
var color3 = _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color3"].FromHexString(color);
|
65352
|
+
return new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color4"](color3.r, color3.g, color3.b, 1.0);
|
65353
|
+
}
|
65354
|
+
return _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color4"].FromHexString(color);
|
65355
|
+
};
|
65356
|
+
ColorLineComponent.prototype.toColor3 = function (color) {
|
65357
|
+
return new _babylonjs_core_Maths_math_color__WEBPACK_IMPORTED_MODULE_2__["Color3"](color.r, color.g, color.b);
|
65358
|
+
};
|
65359
|
+
ColorLineComponent.prototype.render = function () {
|
65423
65360
|
var _this = this;
|
65424
65361
|
var chevron = this.state.isExpanded ? react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_4__["FontAwesomeIcon"], { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_5__["faMinus"] }) : react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_fortawesome_react_fontawesome__WEBPACK_IMPORTED_MODULE_4__["FontAwesomeIcon"], { icon: _fortawesome_free_solid_svg_icons__WEBPACK_IMPORTED_MODULE_5__["faPlus"] });
|
65425
65362
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color3Line" },
|
@@ -65427,19 +65364,22 @@ var Color4LineComponent = /** @class */ (function (_super) {
|
|
65427
65364
|
this.props.icon && react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, className: "icon" }),
|
65428
65365
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "label", title: this.props.label }, this.props.label),
|
65429
65366
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color3" },
|
65430
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_colorPickerComponent__WEBPACK_IMPORTED_MODULE_6__["ColorPickerLineComponent"], { value: this.state.color, onColorChanged: function (color) {
|
65431
|
-
_this.
|
65367
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_colorPickerComponent__WEBPACK_IMPORTED_MODULE_6__["ColorPickerLineComponent"], { linearHint: this.props.isLinear, value: this.props.disableAlpha ? this.toColor3(this.state.color) : this.state.color, onColorChanged: function (color) {
|
65368
|
+
_this.setColor(_this.convertToColor(color));
|
65432
65369
|
} })),
|
65370
|
+
this.props.icon && this.props.lockObject && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "", target: this, propertyName: "colorString", onChange: function (newValue) {
|
65371
|
+
_this.setColorFromString(newValue);
|
65372
|
+
}, onPropertyChangedObservable: this.props.onPropertyChangedObservable })),
|
65433
65373
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "copy hoverIcon", onClick: function () { return _this.copyToClipboard(); }, title: "Copy to clipboard" },
|
65434
65374
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("img", { src: copyIcon, alt: "" })),
|
65435
65375
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "expand hoverIcon", onClick: function () { return _this.switchExpandState(); }, title: "Expand" }, chevron)),
|
65436
65376
|
this.state.isExpanded && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "secondLine" },
|
65437
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](
|
65438
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](
|
65439
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](
|
65440
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](
|
65377
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__["NumericInputComponent"], { label: "r", value: this.state.color.r, onChange: function (value) { return _this.updateStateR(value); } }),
|
65378
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__["NumericInputComponent"], { label: "g", value: this.state.color.g, onChange: function (value) { return _this.updateStateG(value); } }),
|
65379
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__["NumericInputComponent"], { label: "b", value: this.state.color.b, onChange: function (value) { return _this.updateStateB(value); } }),
|
65380
|
+
this.props.disableAlpha || react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_numericInputComponent__WEBPACK_IMPORTED_MODULE_3__["NumericInputComponent"], { label: "a", value: this.state.color.a, onChange: function (value) { return _this.updateStateA(value); } })))));
|
65441
65381
|
};
|
65442
|
-
return
|
65382
|
+
return ColorLineComponent;
|
65443
65383
|
}(react__WEBPACK_IMPORTED_MODULE_1__["Component"]));
|
65444
65384
|
|
65445
65385
|
|
@@ -65467,7 +65407,7 @@ var ColorPickerLineComponent = /** @class */ (function (_super) {
|
|
65467
65407
|
Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"])(ColorPickerLineComponent, _super);
|
65468
65408
|
function ColorPickerLineComponent(props) {
|
65469
65409
|
var _this = _super.call(this, props) || this;
|
65470
|
-
_this.state = { pickerEnabled: false, color: _this.props.value, hex: _this.props
|
65410
|
+
_this.state = { pickerEnabled: false, color: _this.props.value, hex: _this.getHexString(props) };
|
65471
65411
|
_this._floatRef = react__WEBPACK_IMPORTED_MODULE_1__["createRef"]();
|
65472
65412
|
_this._floatHostRef = react__WEBPACK_IMPORTED_MODULE_1__["createRef"]();
|
65473
65413
|
return _this;
|
@@ -65492,13 +65432,17 @@ var ColorPickerLineComponent = /** @class */ (function (_super) {
|
|
65492
65432
|
}
|
65493
65433
|
};
|
65494
65434
|
ColorPickerLineComponent.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
65495
|
-
var diffProps =
|
65435
|
+
var diffProps = this.getHexString(nextProps) !== this.getHexString();
|
65496
65436
|
if (diffProps) {
|
65497
65437
|
nextState.color = nextProps.value;
|
65498
|
-
nextState.hex =
|
65438
|
+
nextState.hex = this.getHexString(nextProps);
|
65499
65439
|
}
|
65500
65440
|
return diffProps || nextState.hex !== this.state.hex || nextState.pickerEnabled !== this.state.pickerEnabled;
|
65501
65441
|
};
|
65442
|
+
ColorPickerLineComponent.prototype.getHexString = function (props) {
|
65443
|
+
if (props === void 0) { props = this.props; }
|
65444
|
+
return props.value.toHexString();
|
65445
|
+
};
|
65502
65446
|
ColorPickerLineComponent.prototype.componentDidUpdate = function () {
|
65503
65447
|
this.syncPositions();
|
65504
65448
|
};
|
@@ -65507,10 +65451,10 @@ var ColorPickerLineComponent = /** @class */ (function (_super) {
|
|
65507
65451
|
};
|
65508
65452
|
ColorPickerLineComponent.prototype.render = function () {
|
65509
65453
|
var _this = this;
|
65510
|
-
var color = this.state.color;
|
65511
65454
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color-picker" },
|
65512
65455
|
this.props.icon && react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, className: "icon" }),
|
65513
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color-rect", ref: this._floatHostRef,
|
65456
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color-rect-background", ref: this._floatHostRef, onClick: function () { return _this.setState({ pickerEnabled: true }); } },
|
65457
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color-rect", style: { background: this.state.hex } })),
|
65514
65458
|
this.state.pickerEnabled && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null,
|
65515
65459
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color-picker-cover", onClick: function (evt) {
|
65516
65460
|
var _a, _b;
|
@@ -65520,7 +65464,7 @@ var ColorPickerLineComponent = /** @class */ (function (_super) {
|
|
65520
65464
|
_this.setState({ pickerEnabled: false });
|
65521
65465
|
} },
|
65522
65466
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "color-picker-float", ref: this._floatRef },
|
65523
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_colorPicker_colorPicker__WEBPACK_IMPORTED_MODULE_2__["ColorPicker"], { color: color, linearhint: this.props.linearHint, onColorChanged: function (color) {
|
65467
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_colorPicker_colorPicker__WEBPACK_IMPORTED_MODULE_2__["ColorPicker"], { color: this.state.color, linearhint: this.props.linearHint, onColorChanged: function (color) {
|
65524
65468
|
var hex = color.toHexString();
|
65525
65469
|
_this.setState({ hex: hex, color: color });
|
65526
65470
|
_this.props.onColorChanged(hex);
|
@@ -65661,6 +65605,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
65661
65605
|
/* harmony import */ var _sliderLineComponent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sliderLineComponent */ "./sharedUiComponents/lines/sliderLineComponent.tsx");
|
65662
65606
|
/* harmony import */ var _babylonjs_core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babylonjs/core/Misc/tools */ "@babylonjs/core/Misc/observable");
|
65663
65607
|
/* harmony import */ var _babylonjs_core_Misc_tools__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babylonjs_core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__);
|
65608
|
+
/* harmony import */ var _targetsProxy__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./targetsProxy */ "./sharedUiComponents/lines/targetsProxy.tsx");
|
65609
|
+
|
65664
65610
|
|
65665
65611
|
|
65666
65612
|
|
@@ -65671,20 +65617,34 @@ var FloatLineComponent = /** @class */ (function (_super) {
|
|
65671
65617
|
var _this = _super.call(this, props) || this;
|
65672
65618
|
_this._localChange = false;
|
65673
65619
|
var currentValue = _this.props.target[_this.props.propertyName];
|
65674
|
-
_this.state = { value:
|
65620
|
+
_this.state = { value: _this.getValueString(currentValue) };
|
65675
65621
|
_this._store = currentValue;
|
65676
65622
|
return _this;
|
65677
65623
|
}
|
65678
65624
|
FloatLineComponent.prototype.componentWillUnmount = function () {
|
65679
65625
|
this.unlock();
|
65680
65626
|
};
|
65627
|
+
FloatLineComponent.prototype.getValueString = function (value) {
|
65628
|
+
if (value) {
|
65629
|
+
if (value === _targetsProxy__WEBPACK_IMPORTED_MODULE_4__["conflictingValuesPlaceholder"]) {
|
65630
|
+
return _targetsProxy__WEBPACK_IMPORTED_MODULE_4__["conflictingValuesPlaceholder"];
|
65631
|
+
}
|
65632
|
+
else if (this.props.isInteger) {
|
65633
|
+
return value.toFixed(0);
|
65634
|
+
}
|
65635
|
+
else {
|
65636
|
+
return value.toFixed(this.props.digits || 4);
|
65637
|
+
}
|
65638
|
+
}
|
65639
|
+
return "0";
|
65640
|
+
};
|
65681
65641
|
FloatLineComponent.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
65682
65642
|
if (this._localChange) {
|
65683
65643
|
this._localChange = false;
|
65684
65644
|
return true;
|
65685
65645
|
}
|
65686
65646
|
var newValue = nextProps.target[nextProps.propertyName];
|
65687
|
-
var newValueString =
|
65647
|
+
var newValueString = this.getValueString(newValue);
|
65688
65648
|
if (newValueString !== nextState.value) {
|
65689
65649
|
nextState.value = newValueString;
|
65690
65650
|
return true;
|
@@ -65762,6 +65722,8 @@ var FloatLineComponent = /** @class */ (function (_super) {
|
|
65762
65722
|
valueAsNumber = parseFloat(this.state.value);
|
65763
65723
|
}
|
65764
65724
|
var className = this.props.smallUI ? "short" : "value";
|
65725
|
+
var value = this.state.value === _targetsProxy__WEBPACK_IMPORTED_MODULE_4__["conflictingValuesPlaceholder"] ? "" : this.state.value;
|
65726
|
+
var placeholder = this.state.value === _targetsProxy__WEBPACK_IMPORTED_MODULE_4__["conflictingValuesPlaceholder"] ? _targetsProxy__WEBPACK_IMPORTED_MODULE_4__["conflictingValuesPlaceholder"] : "";
|
65765
65727
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](react__WEBPACK_IMPORTED_MODULE_1__["Fragment"], null,
|
65766
65728
|
!this.props.useEuler && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: this.props.additionalClass ? this.props.additionalClass + " floatLine" : "floatLine" },
|
65767
65729
|
this.props.icon && react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, className: "icon" }),
|
@@ -65774,12 +65736,12 @@ var FloatLineComponent = /** @class */ (function (_super) {
|
|
65774
65736
|
if (_this.props.onEnter) {
|
65775
65737
|
_this.props.onEnter(_this._store);
|
65776
65738
|
}
|
65777
|
-
}, value:
|
65739
|
+
}, value: value, onBlur: function () {
|
65778
65740
|
_this.unlock();
|
65779
65741
|
if (_this.props.onEnter) {
|
65780
65742
|
_this.props.onEnter(_this._store);
|
65781
65743
|
}
|
65782
|
-
}, onFocus: function () { return _this.lock(); }, onChange: function (evt) { return _this.updateValue(evt.target.value); } })))),
|
65744
|
+
}, placeholder: placeholder, onFocus: function () { return _this.lock(); }, onChange: function (evt) { return _this.updateValue(evt.target.value); } })))),
|
65783
65745
|
this.props.useEuler && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_sliderLineComponent__WEBPACK_IMPORTED_MODULE_2__["SliderLineComponent"], { label: this.props.label, minimum: 0, maximum: 360, step: 0.1, directValue: _babylonjs_core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__["Tools"].ToDegrees(valueAsNumber), onChange: function (value) { return _this.updateValue(_babylonjs_core_Misc_tools__WEBPACK_IMPORTED_MODULE_3__["Tools"].ToRadians(value).toString()); } }))));
|
65784
65746
|
};
|
65785
65747
|
return FloatLineComponent;
|
@@ -66420,6 +66382,8 @@ var SliderLineComponent = /** @class */ (function (_super) {
|
|
66420
66382
|
return false;
|
66421
66383
|
};
|
66422
66384
|
SliderLineComponent.prototype.onChange = function (newValueString) {
|
66385
|
+
if (newValueString === "—")
|
66386
|
+
return;
|
66423
66387
|
this._localChange = true;
|
66424
66388
|
var newValue = parseFloat(newValueString);
|
66425
66389
|
if (this.props.useEuler) {
|
@@ -66476,6 +66440,64 @@ var SliderLineComponent = /** @class */ (function (_super) {
|
|
66476
66440
|
|
66477
66441
|
|
66478
66442
|
|
66443
|
+
/***/ }),
|
66444
|
+
|
66445
|
+
/***/ "./sharedUiComponents/lines/targetsProxy.tsx":
|
66446
|
+
/*!***************************************************!*\
|
66447
|
+
!*** ./sharedUiComponents/lines/targetsProxy.tsx ***!
|
66448
|
+
\***************************************************/
|
66449
|
+
/*! exports provided: conflictingValuesPlaceholder, makeTargetsProxy */
|
66450
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
66451
|
+
|
66452
|
+
"use strict";
|
66453
|
+
__webpack_require__.r(__webpack_exports__);
|
66454
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conflictingValuesPlaceholder", function() { return conflictingValuesPlaceholder; });
|
66455
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeTargetsProxy", function() { return makeTargetsProxy; });
|
66456
|
+
var conflictingValuesPlaceholder = "—";
|
66457
|
+
/**
|
66458
|
+
*
|
66459
|
+
* @param propertyName the property that the input changes
|
66460
|
+
* @param targets a list of selected targets
|
66461
|
+
* @param defaultValue the value that should be returned when two targets have conflicting values
|
66462
|
+
* @param setter an optional setter function to override the default setter behavior
|
66463
|
+
* @returns a proxy object that can be passed as a target into the input
|
66464
|
+
*/
|
66465
|
+
function makeTargetsProxy(targets, onPropertyChangedObservable) {
|
66466
|
+
return new Proxy({}, {
|
66467
|
+
get: function (_, name) {
|
66468
|
+
if (targets.length === 0)
|
66469
|
+
return conflictingValuesPlaceholder;
|
66470
|
+
var firstValue = targets[0][name];
|
66471
|
+
for (var _i = 0, targets_1 = targets; _i < targets_1.length; _i++) {
|
66472
|
+
var target = targets_1[_i];
|
66473
|
+
if (target[name] !== firstValue) {
|
66474
|
+
return conflictingValuesPlaceholder;
|
66475
|
+
}
|
66476
|
+
}
|
66477
|
+
return firstValue;
|
66478
|
+
},
|
66479
|
+
set: function (_, name, value) {
|
66480
|
+
if (value === "—")
|
66481
|
+
return true;
|
66482
|
+
for (var _i = 0, targets_2 = targets; _i < targets_2.length; _i++) {
|
66483
|
+
var target = targets_2[_i];
|
66484
|
+
var initialValue = target[name];
|
66485
|
+
target[name] = value;
|
66486
|
+
if (onPropertyChangedObservable) {
|
66487
|
+
onPropertyChangedObservable.notifyObservers({
|
66488
|
+
object: target,
|
66489
|
+
property: name,
|
66490
|
+
value: target[name],
|
66491
|
+
initialValue: initialValue
|
66492
|
+
});
|
66493
|
+
}
|
66494
|
+
}
|
66495
|
+
return true;
|
66496
|
+
}
|
66497
|
+
});
|
66498
|
+
}
|
66499
|
+
|
66500
|
+
|
66479
66501
|
/***/ }),
|
66480
66502
|
|
66481
66503
|
/***/ "./sharedUiComponents/lines/textInputLineComponent.tsx":
|
@@ -66491,6 +66513,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
66491
66513
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../../../node_modules/tslib/tslib.es6.js");
|
66492
66514
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../../../node_modules/react/index.js");
|
66493
66515
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
66516
|
+
/* harmony import */ var _targetsProxy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./targetsProxy */ "./sharedUiComponents/lines/targetsProxy.tsx");
|
66517
|
+
|
66494
66518
|
|
66495
66519
|
|
66496
66520
|
var TextInputLineComponent = /** @class */ (function (_super) {
|
@@ -66554,14 +66578,16 @@ var TextInputLineComponent = /** @class */ (function (_super) {
|
|
66554
66578
|
};
|
66555
66579
|
TextInputLineComponent.prototype.render = function () {
|
66556
66580
|
var _this = this;
|
66581
|
+
var value = this.state.value === _targetsProxy__WEBPACK_IMPORTED_MODULE_2__["conflictingValuesPlaceholder"] ? "" : this.state.value;
|
66582
|
+
var placeholder = this.state.value === _targetsProxy__WEBPACK_IMPORTED_MODULE_2__["conflictingValuesPlaceholder"] ? _targetsProxy__WEBPACK_IMPORTED_MODULE_2__["conflictingValuesPlaceholder"] : "";
|
66557
66583
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "textInputLine" },
|
66558
66584
|
this.props.icon && react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("img", { src: this.props.icon, title: this.props.iconLabel, alt: this.props.iconLabel, color: "black", className: "icon" }),
|
66559
66585
|
(!this.props.icon || (this.props.icon && this.props.label != "")) && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "label", title: this.props.label }, this.props.label)),
|
66560
66586
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "value" + (this.props.noUnderline === true ? " noUnderline" : "") },
|
66561
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("input", { value:
|
66587
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("input", { value: value, onBlur: function () {
|
66562
66588
|
_this.props.lockObject.lock = false;
|
66563
66589
|
_this.updateValue((_this.props.value !== undefined ? _this.props.value : _this.props.target[_this.props.propertyName]) || "");
|
66564
|
-
}, onFocus: function () { return (_this.props.lockObject.lock = true); }, onChange: function (evt) { return _this.updateValue(evt.target.value); } }))));
|
66590
|
+
}, onFocus: function () { return (_this.props.lockObject.lock = true); }, onChange: function (evt) { return _this.updateValue(evt.target.value); }, placeholder: placeholder }))));
|
66565
66591
|
};
|
66566
66592
|
return TextInputLineComponent;
|
66567
66593
|
}(react__WEBPACK_IMPORTED_MODULE_1__["Component"]));
|
@@ -67187,6 +67213,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
67187
67213
|
/* harmony import */ var _lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../lines/floatLineComponent */ "./sharedUiComponents/lines/floatLineComponent.tsx");
|
67188
67214
|
/* harmony import */ var _lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../lines/textInputLineComponent */ "./sharedUiComponents/lines/textInputLineComponent.tsx");
|
67189
67215
|
/* harmony import */ var _lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../lines/optionsLineComponent */ "./sharedUiComponents/lines/optionsLineComponent.tsx");
|
67216
|
+
/* harmony import */ var _lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../lines/targetsProxy */ "./sharedUiComponents/lines/targetsProxy.tsx");
|
67217
|
+
|
67190
67218
|
|
67191
67219
|
|
67192
67220
|
|
@@ -67201,8 +67229,7 @@ var CommonControlPropertyGridComponent = /** @class */ (function (_super) {
|
|
67201
67229
|
function CommonControlPropertyGridComponent(props) {
|
67202
67230
|
return _super.call(this, props) || this;
|
67203
67231
|
}
|
67204
|
-
CommonControlPropertyGridComponent.prototype.renderGridInformation = function () {
|
67205
|
-
var control = this.props.control;
|
67232
|
+
CommonControlPropertyGridComponent.prototype.renderGridInformation = function (control) {
|
67206
67233
|
if (!control.parent) {
|
67207
67234
|
return null;
|
67208
67235
|
}
|
@@ -67221,7 +67248,17 @@ var CommonControlPropertyGridComponent = /** @class */ (function (_super) {
|
|
67221
67248
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_3__["TextLineComponent"], { label: "Column", value: cellInfos[1] })));
|
67222
67249
|
};
|
67223
67250
|
CommonControlPropertyGridComponent.prototype.render = function () {
|
67224
|
-
var
|
67251
|
+
var controls;
|
67252
|
+
if (this.props.controls) {
|
67253
|
+
controls = this.props.controls;
|
67254
|
+
}
|
67255
|
+
else if (this.props.control) {
|
67256
|
+
controls = [this.props.control];
|
67257
|
+
}
|
67258
|
+
else {
|
67259
|
+
return;
|
67260
|
+
}
|
67261
|
+
var control = controls[0];
|
67225
67262
|
var horizontalOptions = [
|
67226
67263
|
{ label: "Left", value: _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_4__["Control"].HORIZONTAL_ALIGNMENT_LEFT },
|
67227
67264
|
{ label: "Right", value: _babylonjs_gui_2D_controls_control__WEBPACK_IMPORTED_MODULE_4__["Control"].HORIZONTAL_ALIGNMENT_RIGHT },
|
@@ -67235,41 +67272,41 @@ var CommonControlPropertyGridComponent = /** @class */ (function (_super) {
|
|
67235
67272
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", null,
|
67236
67273
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__["LineContainerComponent"], { title: "GENERAL" },
|
67237
67274
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_3__["TextLineComponent"], { label: "Class", value: control.getClassName() }),
|
67238
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Name", target:
|
67275
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Name", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "name", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67239
67276
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textLineComponent__WEBPACK_IMPORTED_MODULE_3__["TextLineComponent"], { label: "Unique ID", value: control.uniqueId.toString() }),
|
67240
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__["SliderLineComponent"], { label: "Alpha", target:
|
67241
|
-
control.color !== undefined && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Color", target:
|
67242
|
-
control.background !== undefined && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Background", target:
|
67243
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "ZIndex", target:
|
67244
|
-
this.renderGridInformation(),
|
67277
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__["SliderLineComponent"], { label: "Alpha", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "alpha", minimum: 0, maximum: 1, step: 0.01, onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67278
|
+
control.color !== undefined && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Color", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "color", onPropertyChangedObservable: this.props.onPropertyChangedObservable })),
|
67279
|
+
control.background !== undefined && (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Background", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "background", onPropertyChangedObservable: this.props.onPropertyChangedObservable })),
|
67280
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "ZIndex", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "zIndex", onPropertyChangedObservable: this.props.onPropertyChangedObservable })),
|
67281
|
+
this.renderGridInformation(control),
|
67245
67282
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__["LineContainerComponent"], { title: "ALIGNMENT" },
|
67246
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_8__["OptionsLineComponent"], { label: "Horizontal", options: horizontalOptions, target:
|
67247
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_8__["OptionsLineComponent"], { label: "Vertical", options: verticalOptions, target:
|
67283
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_8__["OptionsLineComponent"], { label: "Horizontal", options: horizontalOptions, target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "horizontalAlignment", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67284
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_optionsLineComponent__WEBPACK_IMPORTED_MODULE_8__["OptionsLineComponent"], { label: "Vertical", options: verticalOptions, target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "verticalAlignment", onPropertyChangedObservable: this.props.onPropertyChangedObservable })),
|
67248
67285
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__["LineContainerComponent"], { title: "POSITION" },
|
67249
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Left", target:
|
67250
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Top", target:
|
67251
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Width", target:
|
67252
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Height", target:
|
67253
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Padding left", target:
|
67254
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Padding top", target:
|
67255
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Padding right", target:
|
67256
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Padding bottom", target:
|
67286
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Left", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "left", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67287
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Top", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "top", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67288
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Width", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "width", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67289
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Height", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "height", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67290
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Padding left", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "paddingLeft", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67291
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Padding top", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "paddingTop", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67292
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Padding right", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "paddingRight", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67293
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Padding bottom", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "paddingBottom", onPropertyChangedObservable: this.props.onPropertyChangedObservable })),
|
67257
67294
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__["LineContainerComponent"], { title: "TRANSFORMATION", closed: true },
|
67258
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "ScaleX", target:
|
67259
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "ScaleY", target:
|
67260
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__["SliderLineComponent"], { label: "Rotation", target:
|
67261
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Transform center X", target:
|
67262
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Transform center Y", target:
|
67295
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "ScaleX", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "scaleX", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67296
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "ScaleY", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "scaleY", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67297
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_sliderLineComponent__WEBPACK_IMPORTED_MODULE_5__["SliderLineComponent"], { label: "Rotation", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "rotation", minimum: 0, maximum: 2 * Math.PI, step: 0.01, onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67298
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Transform center X", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "transformCenterX", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67299
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Transform center Y", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "transformCenterY", onPropertyChangedObservable: this.props.onPropertyChangedObservable })),
|
67263
67300
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__["LineContainerComponent"], { title: "FONT", closed: true },
|
67264
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Family", target:
|
67265
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Size", target:
|
67266
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Weight", target:
|
67267
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Style", target:
|
67301
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Family", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "fontFamily", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67302
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Size", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "fontSize", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67303
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Weight", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "fontWeight", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67304
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Style", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "fontStyle", onPropertyChangedObservable: this.props.onPropertyChangedObservable })),
|
67268
67305
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_2__["LineContainerComponent"], { title: "SHADOWS", closed: true },
|
67269
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Color", target:
|
67270
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Offset X", target:
|
67271
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Offset Y", target:
|
67272
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Blur", target:
|
67306
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_7__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Color", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "shadowColor", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67307
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Offset X", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "shadowOffsetX", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67308
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Offset Y", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "shadowOffsetY", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67309
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_6__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Blur", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_9__["makeTargetsProxy"])(controls, this.props.onPropertyChangedObservable), propertyName: "shadowBlur", onPropertyChangedObservable: this.props.onPropertyChangedObservable }))));
|
67273
67310
|
};
|
67274
67311
|
return CommonControlPropertyGridComponent;
|
67275
67312
|
}(react__WEBPACK_IMPORTED_MODULE_1__["Component"]));
|
@@ -67674,6 +67711,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
67674
67711
|
/* harmony import */ var _lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../lines/floatLineComponent */ "./sharedUiComponents/lines/floatLineComponent.tsx");
|
67675
67712
|
/* harmony import */ var _lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../lines/textInputLineComponent */ "./sharedUiComponents/lines/textInputLineComponent.tsx");
|
67676
67713
|
/* harmony import */ var _lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../lines/checkBoxLineComponent */ "./sharedUiComponents/lines/checkBoxLineComponent.tsx");
|
67714
|
+
/* harmony import */ var _lines_targetsProxy__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../lines/targetsProxy */ "./sharedUiComponents/lines/targetsProxy.tsx");
|
67715
|
+
|
67677
67716
|
|
67678
67717
|
|
67679
67718
|
|
@@ -67687,14 +67726,14 @@ var RadioButtonPropertyGridComponent = /** @class */ (function (_super) {
|
|
67687
67726
|
return _super.call(this, props) || this;
|
67688
67727
|
}
|
67689
67728
|
RadioButtonPropertyGridComponent.prototype.render = function () {
|
67690
|
-
var
|
67729
|
+
var radioButtons = this.props.radioButtons;
|
67691
67730
|
return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: "pane" },
|
67692
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_tabs_propertyGrids_gui_commonControlPropertyGridComponent__WEBPACK_IMPORTED_MODULE_2__["CommonControlPropertyGridComponent"], { lockObject: this.props.lockObject,
|
67731
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_tabs_propertyGrids_gui_commonControlPropertyGridComponent__WEBPACK_IMPORTED_MODULE_2__["CommonControlPropertyGridComponent"], { lockObject: this.props.lockObject, controls: radioButtons, onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67693
67732
|
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_lineContainerComponent__WEBPACK_IMPORTED_MODULE_3__["LineContainerComponent"], { title: "RADIO BUTTON" },
|
67694
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_4__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Thickness", target:
|
67695
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_4__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Check size ratio", target:
|
67696
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_5__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Group", target:
|
67697
|
-
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_6__["CheckBoxLineComponent"], { label: "Checked", target:
|
67733
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_4__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Thickness", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_7__["makeTargetsProxy"])(radioButtons, this.props.onPropertyChangedObservable), propertyName: "thickness", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67734
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_floatLineComponent__WEBPACK_IMPORTED_MODULE_4__["FloatLineComponent"], { lockObject: this.props.lockObject, label: "Check size ratio", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_7__["makeTargetsProxy"])(radioButtons, this.props.onPropertyChangedObservable), propertyName: "checkSizeRatio", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67735
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_textInputLineComponent__WEBPACK_IMPORTED_MODULE_5__["TextInputLineComponent"], { lockObject: this.props.lockObject, label: "Group", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_7__["makeTargetsProxy"])(radioButtons, this.props.onPropertyChangedObservable), propertyName: "group", onPropertyChangedObservable: this.props.onPropertyChangedObservable }),
|
67736
|
+
react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_lines_checkBoxLineComponent__WEBPACK_IMPORTED_MODULE_6__["CheckBoxLineComponent"], { label: "Checked", target: Object(_lines_targetsProxy__WEBPACK_IMPORTED_MODULE_7__["makeTargetsProxy"])(radioButtons, this.props.onPropertyChangedObservable), propertyName: "isChecked", onPropertyChangedObservable: this.props.onPropertyChangedObservable }))));
|
67698
67737
|
};
|
67699
67738
|
return RadioButtonPropertyGridComponent;
|
67700
67739
|
}(react__WEBPACK_IMPORTED_MODULE_1__["Component"]));
|