@vectoriox/iox-builder 4.37.1 → 4.37.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.
package/index.d.ts
CHANGED
|
@@ -1446,11 +1446,24 @@ interface ViewportState {
|
|
|
1446
1446
|
scale: number;
|
|
1447
1447
|
}
|
|
1448
1448
|
declare class ViewportService {
|
|
1449
|
+
/**
|
|
1450
|
+
* True once the scale is something the author chose (restored from storage, or set since) —
|
|
1451
|
+
* false while it is still the DEFAULT guessed below.
|
|
1452
|
+
*
|
|
1453
|
+
* ⚠️ That default used to be a flat 0.75 whatever the window, so on a 1600px screen the 1440
|
|
1454
|
+
* canvas came up 1080 wide inside a ~1026 slot and the page's own left and right edges were
|
|
1455
|
+
* clipped off on first paint. A zoom read-out of "75%" over a page with no visible boundary
|
|
1456
|
+
* tells the author nothing. The builder now fits the canvas to the room it actually has while
|
|
1457
|
+
* this is false, and never touches a remembered zoom. See `autoFitViewport()`.
|
|
1458
|
+
*/
|
|
1459
|
+
private scaleIsExplicit;
|
|
1449
1460
|
private state;
|
|
1450
1461
|
private stateSubject;
|
|
1451
1462
|
state$: rxjs.Observable<ViewportState>;
|
|
1452
1463
|
getState(): ViewportState;
|
|
1453
1464
|
getScale(): number;
|
|
1465
|
+
/** True when the current scale is this code's guess, not a zoom the author picked. */
|
|
1466
|
+
get scaleIsDefault(): boolean;
|
|
1454
1467
|
/** Show (and edit) `bp`: the canvas takes that breakpoint's preview width and height. */
|
|
1455
1468
|
setBreakpoint(bp: Breakpoint): void;
|
|
1456
1469
|
setScale(scale: number): void;
|
|
@@ -1486,6 +1499,8 @@ declare class ViewportService {
|
|
|
1486
1499
|
* matching breakpoint (Base / Tablet / Small), so old preferences carry over unchanged.
|
|
1487
1500
|
*/
|
|
1488
1501
|
private loadFromStorage;
|
|
1502
|
+
/** A saved zoom is the author's choice and is restored; its absence leaves the guess flagged. */
|
|
1503
|
+
private restoreScale;
|
|
1489
1504
|
static ɵfac: i0.ɵɵFactoryDeclaration<ViewportService, never>;
|
|
1490
1505
|
static ɵprov: i0.ɵɵInjectableDeclaration<ViewportService>;
|
|
1491
1506
|
}
|
|
@@ -1910,6 +1925,14 @@ declare class BuilderComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
|
|
1910
1925
|
onBoardMouseDown(event: MouseEvent): void;
|
|
1911
1926
|
onBoardMouseMove(event: MouseEvent): void;
|
|
1912
1927
|
onBoardMouseUp(): void;
|
|
1928
|
+
/**
|
|
1929
|
+
* Scale the canvas so the WHOLE page frame fits the slot it is given.
|
|
1930
|
+
*
|
|
1931
|
+
* ⚠️ The gutter here must match `$canvas-inset` in the stylesheet, doubled. It said 20 while
|
|
1932
|
+
* the inset was 20px *per side*, so "Fit" left the frame 40px wider than `.preview-scroll`
|
|
1933
|
+
* can show and `overflow: hidden` ate the difference — the one button whose entire job is to
|
|
1934
|
+
* fit was clipping both edges of the page by 20px.
|
|
1935
|
+
*/
|
|
1913
1936
|
private autoFitViewport;
|
|
1914
1937
|
selectPanel(panel: string): void;
|
|
1915
1938
|
handleClick(event: any): void;
|