@leapfrog/interactive-canvas 1.4.1 → 1.4.3
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.
|
@@ -564,6 +564,13 @@ var StandardLayoutManager = /** @class */ (function (_super) {
|
|
|
564
564
|
this.canvas.setMultiSelect(false);
|
|
565
565
|
this.redrawAll.execute(this.canvas);
|
|
566
566
|
};
|
|
567
|
+
/**
|
|
568
|
+
* @override
|
|
569
|
+
*/
|
|
570
|
+
StandardLayoutManager.prototype.onCanvasDimensionsChange = function () {
|
|
571
|
+
this.repositionCutoffs.execute(this.canvas);
|
|
572
|
+
this.repositionBorders.execute(this.canvas);
|
|
573
|
+
};
|
|
567
574
|
/**
|
|
568
575
|
* @override
|
|
569
576
|
*/
|
|
@@ -2545,6 +2552,12 @@ var AbstractInteractiveCanvas = /** @class */ (function () {
|
|
|
2545
2552
|
*/
|
|
2546
2553
|
AbstractInteractiveCanvas.prototype.setDimensionRestrictions = function (restrictions) {
|
|
2547
2554
|
this.dimensionRestrictions$.next(restrictions);
|
|
2555
|
+
var dimensions = this.getDimensions();
|
|
2556
|
+
if (this.dimensionsExceedRestrictions(dimensions)) {
|
|
2557
|
+
var newDimensions = dimensions
|
|
2558
|
+
.withSize(Math.min(Math.max(oc(restrictions).width.min(dimensions.width), dimensions.width), Math.max(oc(restrictions).width.max(dimensions.width))), Math.min(Math.max(oc(restrictions).height.min(dimensions.height), dimensions.height), Math.max(oc(restrictions).height.max(dimensions.height))));
|
|
2559
|
+
this.setBaseDimensions(newDimensions);
|
|
2560
|
+
}
|
|
2548
2561
|
};
|
|
2549
2562
|
AbstractInteractiveCanvas.prototype.getMargin = function () {
|
|
2550
2563
|
var borderWidth = this.getObjectsByTypeInternal(ObjectType.BORDER)
|
|
@@ -566,6 +566,13 @@ var StandardLayoutManager = /** @class */ (function (_super) {
|
|
|
566
566
|
this.canvas.setMultiSelect(false);
|
|
567
567
|
this.redrawAll.execute(this.canvas);
|
|
568
568
|
};
|
|
569
|
+
/**
|
|
570
|
+
* @override
|
|
571
|
+
*/
|
|
572
|
+
StandardLayoutManager.prototype.onCanvasDimensionsChange = function () {
|
|
573
|
+
this.repositionCutoffs.execute(this.canvas);
|
|
574
|
+
this.repositionBorders.execute(this.canvas);
|
|
575
|
+
};
|
|
569
576
|
/**
|
|
570
577
|
* @override
|
|
571
578
|
*/
|
|
@@ -2545,6 +2552,12 @@ var AbstractInteractiveCanvas = /** @class */ (function () {
|
|
|
2545
2552
|
*/
|
|
2546
2553
|
AbstractInteractiveCanvas.prototype.setDimensionRestrictions = function (restrictions) {
|
|
2547
2554
|
this.dimensionRestrictions$.next(restrictions);
|
|
2555
|
+
var dimensions = this.getDimensions();
|
|
2556
|
+
if (this.dimensionsExceedRestrictions(dimensions)) {
|
|
2557
|
+
var newDimensions = dimensions
|
|
2558
|
+
.withSize(Math.min(Math.max(tsOptchain.oc(restrictions).width.min(dimensions.width), dimensions.width), Math.max(tsOptchain.oc(restrictions).width.max(dimensions.width))), Math.min(Math.max(tsOptchain.oc(restrictions).height.min(dimensions.height), dimensions.height), Math.max(tsOptchain.oc(restrictions).height.max(dimensions.height))));
|
|
2559
|
+
this.setBaseDimensions(newDimensions);
|
|
2560
|
+
}
|
|
2548
2561
|
};
|
|
2549
2562
|
AbstractInteractiveCanvas.prototype.getMargin = function () {
|
|
2550
2563
|
var borderWidth = this.getObjectsByTypeInternal(exports.ObjectType.BORDER)
|