Skip to content

Commit 1378ba6

Browse files
muenchrisChris Muench
andauthored
New NMI options for ThingGroups and Flexible Screens (#57)
* Fix for SubProperties in NMI * proper UX Management of Sub-Properties * Fix for super large collapsible groups * Fix for missing Template assignment; fix for SideBar in ClassicMode * no checkin of cdeWorker.js * LiveChart with PixelWidth * Bar with PixelHeight/Width; remove od debugger * fix for Chart Control * Fix for Pixel precision sizing of NMI Controls * Fix for Bar PixelWidth * code smell removed * fix for sonarcloud * Fix for Foreign Things in Screens * Fix for FacePlate inlines pointing at other Things * Missing Event Fire on Screen Model Update * Tuning of Faceplate tags * Fix for custom HomeScreen OnShow not firing; fix for FacePlate parsing * fix for faceplate parsing * SonarCloud Cleanup; Final FacePlate Fix * remove allowanonymour from nmi initialization * SonarCloud cleanup; Support for ReloadAfterLogout; Support for DefaultPortal of a plugin; Fix of Login Screen if host name has changed; * code smell fix * Small Fix for Dashboard Tiles * ForceLoad if DefaultPortal is set * new FitToScreen option for Forms; some more SonarCloud cleanup * code smell fix * Fit To Screen for vertical adjustments * Fix for FitToScreen; new ClassName Macro for Faceplates * FacePlate fix; Copyright to 2023 * Fix for SonarCloud duplication * Correct fetch of images from Mesh Sources; Sonarcloud fixes * sonar cloud fix * Initial work on NMI Editor * Updates to NMI Editor * Support the for the NMI Editor with RedPill * fix for sonar * No Sonar for webworker * still fighting sonarcloud * Still fighting * NMI Model preparation for NMI Editor allowing to remove sub-controls on the fly * Fix for Canvas Controls with Scaling of Screens * New Numeric Macro for html templates * SonarCloud bugfix --------- Co-authored-by: Chris Muench <chris.muench@live.com>
1 parent 1b2bd58 commit 1378ba6

File tree

6 files changed

+102
-27
lines changed

6 files changed

+102
-27
lines changed

src/HTML5/CDMyNMIHtml5RT/ClientBin/CDE/cde.min.js

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3371,6 +3371,14 @@ var cdeNMI;
33713371
for (let offsetElement = theElement; offsetElement; offsetElement = offsetElement.offsetParent) {
33723372
tPoint.x += offsetElement.offsetLeft;
33733373
tPoint.y += offsetElement.offsetTop;
3374+
const ol = offsetElement;
3375+
if (ol.NMIControl && ol.NMIControl.ScreenScale) {
3376+
const sc = ol.NMIControl.ScreenScale;
3377+
if (sc != 0.0 && sc != 1.0) {
3378+
tPoint.x *= sc;
3379+
tPoint.y *= sc;
3380+
}
3381+
}
33743382
if (offsetElement.className && cde.MyBaseAssets.MyServiceHostInfo.WebPlatform === 0 && (offsetElement.className === 'cdeHeader'))
33753383
HasFixedRoot = true;
33763384
}
@@ -6277,7 +6285,7 @@ var cdeNMI;
62776285
if (!this.MyOverlay) {
62786286
const tcr = cdeNMI.MyTCF.CreateNMIControl(cdeNMI.cdeControlType.DrawOverlay);
62796287
tcr.MyFormID = this.MyScreenID;
6280-
this.MyOverlay = tcr.Create(this, { PreInitBag: ["HideClear=true", "EnableRecognizer=true"] });
6288+
this.MyOverlay = tcr.Create(this, { PreInitBag: ["HideClear=true", "EnableRecognizer=true"], ScreenID: this.MyScreenID });
62816289
}
62826290
else {
62836291
cdeNMI.UnselectAllControls();
@@ -7512,6 +7520,11 @@ var cdeNMI;
75127520
}
75137521
let tBaseControl = null;
75147522
const tScreen = cdeNMI.MyScreenManager && pScreenID ? cdeNMI.MyScreenManager.GetScreenByID(pScreenID) : null;
7523+
if (tScreen === null || tScreen === void 0 ? void 0 : tScreen.MyOverlay) {
7524+
cdeNMI.UnselectAllControls();
7525+
tScreen.RemoveChild(tScreen.MyOverlay);
7526+
tScreen.MyOverlay = null;
7527+
}
75157528
if (tFormInfo) {
75167529
const tTRF = cdeNMI.TheTRF.FromScreenForm(tModel, tTableName);
75177530
if (tFormInfo.IsAlwaysEmpty === true)
@@ -8675,7 +8688,7 @@ var cdeNMI;
86758688
return tSeg;
86768689
}
86778690
cdeNMI.ReturnStringSegment = ReturnStringSegment;
8678-
function CreateTCB(pFacePlate, pName, pType = cdeNMI.cdeControlType.SingleEnded) {
8691+
function CreateTCB(pFacePlate, pName, pType = cdeNMI.cdeControlType.SingleEnded, pDigits = 0) {
86798692
const pTRF = pFacePlate.TRF;
86808693
const tTCB = new cdeNMI.TheControlBlock();
86818694
tTCB.TargetID = "CNMIC" + (cdeNMI.MyNMISettings.IDCounter++);
@@ -8693,10 +8706,15 @@ var cdeNMI;
86938706
tFldInfo.FormID = cde.GuidToString(pTRF.TableName);
86948707
tFldInfo.cdeN = pTRF.FldInfo.cdeN;
86958708
tFldInfo.Type = pType;
8709+
if (pType == cdeNMI.cdeControlType.Number)
8710+
tFldInfo["Format"] = pDigits;
86968711
tFldInfo["Element"] = "span";
86978712
const tMyScreenInfo = cdeNMI.MyNMIModels[pTRF.ModelID];
86988713
if (tMyScreenInfo && tMyScreenInfo.MyStorageMirror[tOwnerThingID]) {
86998714
tFldContent = cdeNMI.GetFldContent(tMyScreenInfo.MyStorageMirror[tOwnerThingID][pTRF.RowNo], tFldInfo, false);
8715+
if (pType == cdeNMI.cdeControlType.Number && tFldContent && pDigits > 0) {
8716+
tFldContent = parseFloat(tFldContent).toFixed(pDigits);
8717+
}
87008718
}
87018719
const tTRF = new cdeNMI.TheTRF(tOwnerThingID, pTRF ? pTRF.RowNo : 0, tFldInfo);
87028720
tTRF.ModelID = pTRF ? pTRF.ModelID : null;
@@ -8752,6 +8770,19 @@ var cdeNMI;
87528770
tTCB = CreateTCB(pFacePlate, tSeg.Inner);
87538771
pFacePlate.HTML = pFacePlate.HTML.replace(tSeg.Outer, "<span ID=" + tTCB.TargetID + "></span>");
87548772
}
8773+
while (true) {
8774+
tSeg = cdeNMI.ReturnStringSegment(pFacePlate.HTML, "<%C12:", "%>");
8775+
if (tSeg === null)
8776+
break;
8777+
const tF = tSeg.Inner.split(':');
8778+
let digi = 0;
8779+
if (tF.length > 1) {
8780+
digi = cde.CInt(tF[0]);
8781+
tSeg.Inner = tF[1];
8782+
}
8783+
tTCB = CreateTCB(pFacePlate, tSeg.Inner, cdeNMI.cdeControlType.Number, digi);
8784+
pFacePlate.HTML = pFacePlate.HTML.replace(tSeg.Outer, "<span ID=" + tTCB.TargetID + "></span>");
8785+
}
87558786
while (true) {
87568787
tTCB = cdeNMI.ParseTagMacro(pFacePlate, '<%I:', '');
87578788
if (tTCB === null)
@@ -14702,9 +14733,6 @@ var cdeNMI;
1470214733
}
1470314734
RedrawForeground() {
1470414735
this.redrawPending = false;
14705-
const ts = cdeNMI.TheNMIScreen.GetScreenByID(this.MyFormID);
14706-
if (ts)
14707-
this.ScreenScale = ts.ScreenScale;
1470814736
if (!cde.CBool(this.GetProperty("Playback")) && !cde.CBool(this.GetProperty("NoClear")))
1470914737
this.fgctx.clearRect(0, 0, this.fgctx.canvas.width, this.fgctx.canvas.height);
1471014738
let tDrawingObjects = this.GetProperty("DataContext");
@@ -15500,6 +15528,11 @@ var cdeNMI;
1550015528
}
1550115529
this.divTiles.id = "cdeOverlay";
1550215530
this.divTiles.className = "cdeDrawOverlay";
15531+
this.divTiles.style.transformOrigin = "top left";
15532+
const tScreen = cdeNMI.MyScreenManager.GetScreenByID(pScreenID);
15533+
if (tScreen && tScreen.ScreenScale != 1.0 && tScreen.ScreenScale != 0.0) {
15534+
this.divTiles.style.transform = "scale(" + 1 / tScreen.ScreenScale + ")";
15535+
}
1550315536
this.SetElement(this.divTiles, false);
1550415537
this.PreventDefault = true;
1550515538
this.PreventManipulation = true;
@@ -15613,6 +15646,7 @@ var cdeNMI;
1561315646
this.mMinValue = 0;
1561415647
this.IsPointerDown = false;
1561515648
this.PointerID = 0;
15649+
this.Scale = 1.0;
1561615650
}
1561715651
InitControl(pTargetControl, pTRF, pPropertyBag, pScreenID) {
1561815652
this.MyBaseType = cdeNMI.cdeControlType.BarChart;
@@ -15630,8 +15664,12 @@ var cdeNMI;
1563015664
this.SetProperty("Disabled", (!this.MyFieldInfo || (this.MyFieldInfo.Flags & 2) === 0));
1563115665
if (this.MyFormID && cdeNMI.MyScreenManager) {
1563215666
const tScreen = cdeNMI.MyScreenManager.GetScreenByID(this.MyFormID);
15633-
if (tScreen)
15667+
if (tScreen) {
1563415668
tScreen.RegisterEvent("OnLoaded", () => this.ApplySkin());
15669+
if (tScreen.ScreenScale != 1.0 && tScreen.ScreenScale != 0.0) {
15670+
this.Scale = 1.0; // 1/tScreen.ScreenScale
15671+
}
15672+
}
1563515673
}
1563615674
cde.MyBaseAssets.RegisterEvent("ThemeSwitched", () => {
1563715675
if (cde.MyBaseAssets.MyServiceHostInfo.IsLiteTheme)
@@ -15733,6 +15771,8 @@ var cdeNMI;
1573315771
if (this.mCanvas.MyHeight === 0 || this.mCanvas.MyWidth === 0)
1573415772
return;
1573515773
}
15774+
if (pValue === "")
15775+
pValue = 0;
1573615776
this.wasDrawnOnce = true;
1573715777
this.tText = new cdeNMI.TheDrawingObject();
1573815778
this.tText.Type = 3;
@@ -15846,7 +15886,7 @@ var cdeNMI;
1584615886
thisObj.IsPointerDown = false;
1584715887
thisObj.PointerID = 0;
1584815888
if (pPointer.pointerEvent === cdeNMI.cdeInputEvent.END)
15849-
thisObj.CalcNewPos(pPointer.AdjPosition.x, pPointer.AdjPosition.y, 1);
15889+
thisObj.CalcNewPos(pPointer.AdjPosition.x / thisObj.Scale, pPointer.AdjPosition.y / thisObj.Scale, 1);
1585015890
}
1585115891
sinkPointerDown(pTarget, pEvent, pPointer) {
1585215892
if (pTarget.GetProperty("Disabled") === true)
@@ -15855,7 +15895,7 @@ var cdeNMI;
1585515895
if (!thisObj.IsPointerDown && thisObj.GetProperty("Disabled") !== true) {
1585615896
thisObj.IsPointerDown = true;
1585715897
thisObj.PointerID = pPointer.Identifier;
15858-
thisObj.CalcNewPos(pPointer.AdjPosition.x, pPointer.AdjPosition.y, 0);
15898+
thisObj.CalcNewPos(pPointer.AdjPosition.x / thisObj.Scale, pPointer.AdjPosition.y / thisObj.Scale, 0);
1585915899
}
1586015900
}
1586115901
sinkTranslate(pTarget, pEvent, pPointer) {
@@ -15864,9 +15904,9 @@ var cdeNMI;
1586415904
const thisObj = pTarget;
1586515905
const tPS = thisObj.GetProperty("TouchPoints");
1586615906
if (tPS > 1)
15867-
thisObj.CalcNewPos(pPointer.AdjPosition.x, pPointer.AdjPosition.y, 2);
15907+
thisObj.CalcNewPos(pPointer.AdjPosition.x / thisObj.Scale, pPointer.AdjPosition.y / thisObj.Scale, 2);
1586815908
else
15869-
thisObj.CalcNewPos(pPointer.AdjPosition.x, pPointer.AdjPosition.y, 0);
15909+
thisObj.CalcNewPos(pPointer.AdjPosition.x / thisObj.Scale, pPointer.AdjPosition.y / thisObj.Scale, 0);
1587015910
}
1587115911
CalcNewPos(pX, pY, bSetVal) {
1587215912
if (!this.mCanvas)
@@ -16684,9 +16724,6 @@ var cdeNMI;
1668416724
}
1668516725
else if (pName === "Background" && this.GaugeShell) {
1668616726
this.mBackground = pValue;
16687-
this.IsDirty = true;
16688-
}
16689-
else if (pName === "Title") {
1669016727
bIsDirty = true;
1669116728
}
1669216729
else if (pName === "SubTitle" || pName === "LowerLimit" || pName === "UpperLimit") {

src/HTML5/cdeTS/cde/src/cdeNMI/cdeNMIModel-5.0.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
SaveProperty(pName: string, pValue);
1919
SetToDefault(bOnlyIfEmpty: boolean);
2020
AppendChild(pChild: INMIControl);
21+
RemoveChild(pChild: INMIControl);
2122
AppendElement(pEle: HTMLElement);
2223
DeleteControl(tControl: INMIControl);
2324
RegisterNMIControl(): string;
@@ -610,6 +611,14 @@
610611
for (let offsetElement: HTMLElement = theElement; offsetElement; offsetElement = offsetElement.offsetParent as HTMLElement) {
611612
tPoint.x += offsetElement.offsetLeft;
612613
tPoint.y += offsetElement.offsetTop;
614+
const ol: any = offsetElement;
615+
if (ol.NMIControl && ol.NMIControl.ScreenScale) {
616+
const sc = ol.NMIControl.ScreenScale;
617+
if (sc != 0.0 && sc != 1.0) {
618+
tPoint.x *= sc;
619+
tPoint.y *= sc;
620+
}
621+
}
613622
if (offsetElement.className && cde.MyBaseAssets.MyServiceHostInfo.WebPlatform === 0 && (offsetElement.className === 'cdeHeader'))
614623
HasFixedRoot = true;
615624
}

src/HTML5/cdeTS/cde/src/cdeNMI/cdeNMIScreen-5.0.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@
331331
if (!this.MyOverlay) {
332332
const tcr = cdeNMI.MyTCF.CreateNMIControl(cdeNMI.cdeControlType.DrawOverlay);
333333
tcr.MyFormID = this.MyScreenID;
334-
this.MyOverlay = tcr.Create(this, { PreInitBag: ["HideClear=true", "EnableRecognizer=true"] }) as INMICanvasDraw;
334+
this.MyOverlay = tcr.Create(this, { PreInitBag: ["HideClear=true", "EnableRecognizer=true"], ScreenID: this.MyScreenID }) as INMICanvasDraw;
335335
}
336336
else {
337337
cdeNMI.UnselectAllControls();

src/HTML5/cdeTS/cde/src/cdeNMI/cdeNMIScreenManager-5.0.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,11 @@
955955
}
956956
let tBaseControl: INMIDataView = null;
957957
const tScreen: cdeNMI.INMIScreen = cdeNMI.MyScreenManager && pScreenID ? cdeNMI.MyScreenManager.GetScreenByID(pScreenID) : null;
958+
if (tScreen?.MyOverlay) {
959+
cdeNMI.UnselectAllControls();
960+
tScreen.RemoveChild(tScreen.MyOverlay);
961+
tScreen.MyOverlay = null;
962+
}
958963
if (tFormInfo) {
959964
const tTRF: TheTRF = cdeNMI.TheTRF.FromScreenForm(tModel, tTableName);
960965
if (tFormInfo.IsAlwaysEmpty === true)

src/HTML5/cdeTS/cde/src/cdeNMI/cdeNMIUtils-5.0.ts

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,11 @@ namespace cdeNMI {
344344
return tSeg;
345345
}
346346

347-
export function CreateTCB(pFacePlate: cdeNMI.TheFaceWait, pName: string, pType: cdeNMI.cdeControlType = cdeNMI.cdeControlType.SingleEnded): cdeNMI.TheControlBlock {
347+
export function CreateTCB(pFacePlate: cdeNMI.TheFaceWait, pName: string, pType: cdeNMI.cdeControlType = cdeNMI.cdeControlType.SingleEnded, pDigits: number = 0): cdeNMI.TheControlBlock {
348348
const pTRF: cdeNMI.TheTRF = pFacePlate.TRF;
349349
const tTCB: cdeNMI.TheControlBlock = new cdeNMI.TheControlBlock();
350350
tTCB.TargetID = "CNMIC" + (cdeNMI.MyNMISettings.IDCounter++);
351-
tTCB.MyControl = cdeNMI.MyTCF.CreateNMIControl(cdeControlType.SmartLabel);
351+
tTCB.MyControl = cdeNMI.MyTCF.CreateNMIControl(cdeControlType.SmartLabel);
352352

353353
let tFldContent = "";
354354
const tFldInfo: cdeNMI.TheFieldInfo = new cdeNMI.TheFieldInfo(cdeControlType.SmartLabel, 0, null);
@@ -363,11 +363,16 @@ namespace cdeNMI {
363363
tFldInfo.FormID = cde.GuidToString(pTRF.TableName);
364364
tFldInfo.cdeN = pTRF.FldInfo.cdeN;
365365
tFldInfo.Type = pType;
366+
if (pType == cdeNMI.cdeControlType.Number)
367+
tFldInfo["Format"] = pDigits;
366368
tFldInfo["Element"] = "span";
367369

368370
const tMyScreenInfo = cdeNMI.MyNMIModels[pTRF.ModelID];
369371
if (tMyScreenInfo && tMyScreenInfo.MyStorageMirror[tOwnerThingID]) {
370372
tFldContent = cdeNMI.GetFldContent(tMyScreenInfo.MyStorageMirror[tOwnerThingID][pTRF.RowNo], tFldInfo, false);
373+
if (pType == cdeNMI.cdeControlType.Number && tFldContent && pDigits > 0) {
374+
tFldContent = parseFloat(tFldContent).toFixed(pDigits);
375+
}
371376
}
372377
const tTRF: cdeNMI.TheTRF = new cdeNMI.TheTRF(tOwnerThingID, pTRF ? pTRF.RowNo : 0, tFldInfo);
373378
tTRF.ModelID = pTRF ? pTRF.ModelID : null;
@@ -420,6 +425,18 @@ namespace cdeNMI {
420425
tTCB = CreateTCB(pFacePlate, tSeg.Inner);
421426
pFacePlate.HTML = pFacePlate.HTML.replace(tSeg.Outer, "<span ID=" + tTCB.TargetID + "></span>");
422427
}
428+
while (true) {
429+
tSeg = cdeNMI.ReturnStringSegment(pFacePlate.HTML, "<%C12:", "%>");
430+
if (tSeg === null) break;
431+
const tF = tSeg.Inner.split(':');
432+
let digi = 0;
433+
if (tF.length > 1) {
434+
digi = cde.CInt(tF[0]);
435+
tSeg.Inner = tF[1];
436+
}
437+
tTCB = CreateTCB(pFacePlate, tSeg.Inner, cdeNMI.cdeControlType.Number, digi);
438+
pFacePlate.HTML = pFacePlate.HTML.replace(tSeg.Outer, "<span ID=" + tTCB.TargetID + "></span>");
439+
}
423440
while (true) {
424441
tTCB = cdeNMI.ParseTagMacro(pFacePlate, '<%I:', '');
425442
if (tTCB === null) break;

src/HTML5/cdeTS/cde/src/cdeNMIControls/cdeNMIDrawControls-5.0.ts

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,6 @@
439439

440440
RedrawForeground() {
441441
this.redrawPending = false;
442-
const ts = TheNMIScreen.GetScreenByID(this.MyFormID);
443-
if (ts)
444-
this.ScreenScale = ts.ScreenScale;
445-
446442
if (!cde.CBool(this.GetProperty("Playback")) && !cde.CBool(this.GetProperty("NoClear")))
447443
this.fgctx.clearRect(0, 0, this.fgctx.canvas.width, this.fgctx.canvas.height);
448444

@@ -1286,6 +1282,12 @@
12861282
}
12871283
this.divTiles.id = "cdeOverlay";
12881284
this.divTiles.className = "cdeDrawOverlay";
1285+
this.divTiles.style.transformOrigin = "top left";
1286+
const tScreen = cdeNMI.MyScreenManager.GetScreenByID(pScreenID);
1287+
if (tScreen && tScreen.ScreenScale != 1.0 && tScreen.ScreenScale != 0.0) {
1288+
this.divTiles.style.transform = "scale(" + 1 / tScreen.ScreenScale + ")";
1289+
}
1290+
12891291
this.SetElement(this.divTiles, false);
12901292

12911293
this.PreventDefault = true;
@@ -1428,6 +1430,7 @@
14281430

14291431
IsPointerDown = false;
14301432
PointerID = 0;
1433+
Scale = 1.0;
14311434

14321435
public InitControl(pTargetControl: cdeNMI.INMIControl, pTRF?: cdeNMI.TheTRF, pPropertyBag?: string[], pScreenID?: string): boolean {
14331436
this.MyBaseType = cdeControlType.BarChart;
@@ -1450,8 +1453,12 @@
14501453
this.SetProperty("Disabled", (!this.MyFieldInfo || (this.MyFieldInfo.Flags & 2) === 0));
14511454
if (this.MyFormID && cdeNMI.MyScreenManager) {
14521455
const tScreen: INMIScreen = cdeNMI.MyScreenManager.GetScreenByID(this.MyFormID);
1453-
if (tScreen)
1456+
if (tScreen) {
14541457
tScreen.RegisterEvent("OnLoaded", () => this.ApplySkin());
1458+
if (tScreen.ScreenScale != 1.0 && tScreen.ScreenScale != 0.0) {
1459+
this.Scale = 1.0;// 1/tScreen.ScreenScale
1460+
}
1461+
}
14551462
}
14561463
cde.MyBaseAssets.RegisterEvent("ThemeSwitched", () => {
14571464
if (cde.MyBaseAssets.MyServiceHostInfo.IsLiteTheme)
@@ -1544,6 +1551,8 @@
15441551
if (this.mCanvas.MyHeight === 0 || this.mCanvas.MyWidth === 0)
15451552
return;
15461553
}
1554+
if (pValue === "")
1555+
pValue = 0;
15471556
this.wasDrawnOnce = true;
15481557
this.tText = new TheDrawingObject();
15491558
this.tText.Type = 3;
@@ -1658,7 +1667,7 @@
16581667
thisObj.IsPointerDown = false;
16591668
thisObj.PointerID = 0;
16601669
if (pPointer.pointerEvent === cdeNMI.cdeInputEvent.END)
1661-
thisObj.CalcNewPos(pPointer.AdjPosition.x, pPointer.AdjPosition.y, 1);
1670+
thisObj.CalcNewPos(pPointer.AdjPosition.x / thisObj.Scale, pPointer.AdjPosition.y / thisObj.Scale, 1);
16621671
}
16631672

16641673
sinkPointerDown(pTarget: INMIControl, pEvent: Event, pPointer: ThePointer) {
@@ -1667,7 +1676,7 @@
16671676
if (!thisObj.IsPointerDown && thisObj.GetProperty("Disabled") !== true) {
16681677
thisObj.IsPointerDown = true;
16691678
thisObj.PointerID = pPointer.Identifier;
1670-
thisObj.CalcNewPos(pPointer.AdjPosition.x, pPointer.AdjPosition.y, 0);
1679+
thisObj.CalcNewPos(pPointer.AdjPosition.x / thisObj.Scale, pPointer.AdjPosition.y / thisObj.Scale, 0);
16711680
}
16721681
}
16731682

@@ -1676,9 +1685,9 @@
16761685
const thisObj: ctrlBarChart = pTarget as ctrlBarChart;
16771686
const tPS: number = thisObj.GetProperty("TouchPoints");
16781687
if (tPS > 1)
1679-
thisObj.CalcNewPos(pPointer.AdjPosition.x, pPointer.AdjPosition.y, 2);
1688+
thisObj.CalcNewPos(pPointer.AdjPosition.x / thisObj.Scale, pPointer.AdjPosition.y / thisObj.Scale, 2);
16801689
else
1681-
thisObj.CalcNewPos(pPointer.AdjPosition.x, pPointer.AdjPosition.y, 0);
1690+
thisObj.CalcNewPos(pPointer.AdjPosition.x / thisObj.Scale, pPointer.AdjPosition.y / thisObj.Scale, 0);
16821691
}
16831692

16841693
CalcNewPos(pX: number, pY: number, bSetVal: number) {
@@ -2560,8 +2569,6 @@
25602569
this.GaugeShell.SetProperty("Background", pValue);
25612570
} else if (pName === "Background" && this.GaugeShell) {
25622571
this.mBackground = pValue;
2563-
this.IsDirty = true;
2564-
} else if (pName === "Title") {
25652572
bIsDirty = true;
25662573
} else if (pName === "SubTitle" || pName === "LowerLimit" || pName === "UpperLimit") {
25672574
bIsDirty = true;

0 commit comments

Comments
 (0)