|
@@ -1401,7 +1401,7 @@ var BABYLON;
|
|
|
Control.AddHeader = function (control, text, size, options) {
|
|
|
var panel = new BABYLON.GUI.StackPanel("panel");
|
|
|
var isHorizontal = options ? options.isHorizontal : true;
|
|
|
- var controlFirst = options ? options.controlFirst : false;
|
|
|
+ var controlFirst = options ? options.controlFirst : true;
|
|
|
panel.isVertical = !isHorizontal;
|
|
|
var header = new BABYLON.GUI.TextBlock("header");
|
|
|
header.text = text;
|
|
@@ -3111,8 +3111,7 @@ var BABYLON;
|
|
|
// Events
|
|
|
_this._pointerIsDown = false;
|
|
|
_this.value = new BABYLON.Color3(.88, .1, .1);
|
|
|
- _this.width = "200px";
|
|
|
- _this.height = "200px";
|
|
|
+ _this.size = "200px";
|
|
|
_this.isPointerBlocker = true;
|
|
|
return _this;
|
|
|
}
|
|
@@ -3135,6 +3134,42 @@ var BABYLON;
|
|
|
enumerable: true,
|
|
|
configurable: true
|
|
|
});
|
|
|
+ Object.defineProperty(ColorPicker.prototype, "width", {
|
|
|
+ set: function (value) {
|
|
|
+ if (this._width.toString(this._host) === value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this._width.fromString(value)) {
|
|
|
+ this._height.fromString(value);
|
|
|
+ this._markAsDirty();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(ColorPicker.prototype, "height", {
|
|
|
+ set: function (value) {
|
|
|
+ if (this._height.toString(this._host) === value) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this._height.fromString(value)) {
|
|
|
+ this._width.fromString(value);
|
|
|
+ this._markAsDirty();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(ColorPicker.prototype, "size", {
|
|
|
+ get: function () {
|
|
|
+ return this.width;
|
|
|
+ },
|
|
|
+ set: function (value) {
|
|
|
+ this.width = value;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
ColorPicker.prototype._getTypeName = function () {
|
|
|
return "ColorPicker";
|
|
|
};
|