From e2b01f5fcf33baf978d44145bab13accdc922583 Mon Sep 17 00:00:00 2001 From: Lucio Maranta Date: Mon, 16 Sep 2019 16:55:48 +0200 Subject: [PATCH] Fix siemens self adaptive path Fix user softkey scrolling --- Step.NC/SiemensToolTableAdapter.cs | 7 +++--- .../assets/styles/base/plc-softkeys.less | 5 +++- Step/wwwroot/assets/styles/style.css | 4 +++- .../under-the-hood/components/soft-key1.vue | 24 +++++++++++++++++-- .../under-the-hood/components/soft-key2.vue | 4 ++-- 5 files changed, 35 insertions(+), 9 deletions(-) diff --git a/Step.NC/SiemensToolTableAdapter.cs b/Step.NC/SiemensToolTableAdapter.cs index ba94afb2..24829b26 100644 --- a/Step.NC/SiemensToolTableAdapter.cs +++ b/Step.NC/SiemensToolTableAdapter.cs @@ -26,13 +26,16 @@ namespace Step.NC config.RadiusMetricType = (ToolManagerConfig.ToolMetricType == RADIUS_METRIC); + config.SelfAdaptivePathOptionActive = true; + if (!ToolManagerConfig.SelfAdaptivePathOpt) + config.SelfAdaptivePathOptionActive = false; + if (NcConfig.NcVendor != NC_VENDOR.SIEMENS && NcConfig.NcVendor != NC_VENDOR.DEMO) { // Setup options config.FamilyOptionActive = true; config.MultitoolOptionActive = true; config.OffsetOptionActive = true; - config.SelfAdaptivePathOptionActive = true; // Add categories to be removed List categories = new List(); @@ -57,8 +60,6 @@ namespace Step.NC if (!ToolManagerConfig.OffsetOpt) config.OffsetOptionActive = false; - if (!ToolManagerConfig.SelfAdaptivePathOpt) - config.SelfAdaptivePathOptionActive = false; categories.Add("offset"); diff --git a/Step/wwwroot/assets/styles/base/plc-softkeys.less b/Step/wwwroot/assets/styles/base/plc-softkeys.less index d820544d..5dd8655f 100644 --- a/Step/wwwroot/assets/styles/base/plc-softkeys.less +++ b/Step/wwwroot/assets/styles/base/plc-softkeys.less @@ -466,7 +466,6 @@ overflow: hidden; span { - display: inline-block; animation: marquee 3s linear infinite; } @@ -479,6 +478,10 @@ } } } + + .soft-key-title{ + display: inline-block; + } } #nc-softkeys-container { diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index 934f701b..be9e4b49 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -6249,7 +6249,6 @@ footer .container button.big:before { overflow: hidden; } .soft-key .horizontal-scroll span { - display: inline-block; animation: marquee 3s linear infinite; } @keyframes marquee { @@ -6260,6 +6259,9 @@ footer .container button.big:before { transform: translate(-100%, 0); } } +.soft-key .soft-key-title { + display: inline-block; +} #nc-softkeys-container { width: 312px; height: 216px; diff --git a/Step/wwwroot/src/app_modules/under-the-hood/components/soft-key1.vue b/Step/wwwroot/src/app_modules/under-the-hood/components/soft-key1.vue index 4676a083..c457aa9b 100644 --- a/Step/wwwroot/src/app_modules/under-the-hood/components/soft-key1.vue +++ b/Step/wwwroot/src/app_modules/under-the-hood/components/soft-key1.vue @@ -2,10 +2,14 @@
-
{{title}}
+ > +
+ {{title}} +
@@ -55,6 +59,12 @@ export default { selected: { default: false }, confirmationNeeded: { default: false }, visible: { default: false } + }, + data: function() { + return { + mouseOver: false, + duration: 2 + }; }, computed: { keys() { @@ -117,6 +127,16 @@ export default { }, selectedItem: function() { this.$emit("selectedItem"); + }, + onMouseOver(){ + if(this.$refs.longTitle.clientWidth > 184 ) { + this.duration = this.title.length / 10 + this.mouseOver = true + } + }, + onMouseDown(){ + if(this.mouseOver) + this.mouseOver = false } } }; diff --git a/Step/wwwroot/src/app_modules/under-the-hood/components/soft-key2.vue b/Step/wwwroot/src/app_modules/under-the-hood/components/soft-key2.vue index 65c6a9e7..ebef9381 100644 --- a/Step/wwwroot/src/app_modules/under-the-hood/components/soft-key2.vue +++ b/Step/wwwroot/src/app_modules/under-the-hood/components/soft-key2.vue @@ -7,7 +7,7 @@ @click="selectedItem()" >
- {{title}} + {{title}}
@@ -68,7 +68,7 @@ export default { this.$emit("selectedItem"); }, onMouseOver(){ - if(this.title.length > 26) { + if(this.$refs.longTitle.clientWidth > 184 ) { this.duration = this.title.length / 10 this.mouseOver = true }