Skip to content

Commit c5c0278

Browse files
committed
Added simulator "device scale enabled" flag (#559)
1 parent 3e28aca commit c5c0278

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/surveylive.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ export class SurveyLiveTester {
3333
public set simulatorEnabled(value: boolean) {
3434
this._simulatorEnabled(value);
3535
}
36+
private _simulatorScaleEnabled = ko.observable<boolean>(true);
37+
public get simulatorScaleEnabled() {
38+
return this._simulatorScaleEnabled();
39+
}
40+
public set simulatorScaleEnabled(value: boolean) {
41+
this._simulatorScaleEnabled(value);
42+
}
3643
private simulator;
3744
public simulatorOptions = {
3845
device: "desktop",
@@ -276,7 +283,7 @@ export class SurveyLiveTester {
276283
var offsetRatioX = this.koLandscapeOrientation() ? 0.15 : 0.165;
277284
var offsetRatioY = this.koLandscapeOrientation() ? 0.17 : 0.155;
278285
return {
279-
scale: scale,
286+
scale: this.simulatorScaleEnabled ? scale : 1,
280287
width: width,
281288
height: height,
282289
frameWidth: width * 1.33,

0 commit comments

Comments
 (0)