fuxa how to customize controls

See original GitHub issue

Hello: fuxa how to customize controls

I have done the following work:

  1. Added htmlyecomponent using angular cli

  2. The code of editor.component.html file is modified as follows: <div class="svg-tool-button" matTooltip="{{'editor.controls-ye' | translate}}" [ngClass]="{'svg-tool-active': isModeActive('html_ye')}" (click)="setMode('html_ye')"> <span class="icon-tool icon-text"></span> </div>

  3. The editor.component.ts file code is modified as follows: private getGaugeTitle(type) { let msg = ''; if (type.startsWith(HtmlInputComponent.TypeTag)) { this.translateService.get('editor.controls-input-settings').subscribe((txt: string) => { msg = txt }); } else if (type.startsWith(HtmlYeComponent.TypeTag)) { this.translateService.get('editor.controls-ye-settings').subscribe((txt: string) => { msg = txt }); } else if (type.startsWith(ValueComponent.TypeTag)) { this.translateService.get('editor.controls-output-settings').subscribe((txt: string) => { msg = txt }); } else if (type.startsWith(HtmlButtonComponent.TypeTag)) { this.translateService.get('editor.controls-button-settings').subscribe((txt: string) => { msg = txt }); } else if (type.startsWith(HtmlSelectComponent.TypeTag)) { this.translateService.get('editor.controls-select-settings').subscribe((txt: string) => { msg = txt }); } else if (type.startsWith(GaugeProgressComponent.TypeTag)) { this.translateService.get('editor.controls-progress-settings').subscribe((txt: string) => { msg = txt }); } else if (type.startsWith(GaugeSemaphoreComponent.TypeTag)) { this.translateService.get('editor.controls-semaphore-settings').subscribe((txt: string) => { msg = txt }); } else { this.translateService.get('editor.controls-shape-settings').subscribe((txt: string) => { msg = txt }); } return msg; }

  4. The code of gauges.component.ts file is modified as follows: `// list of gauges with input static GaugeWithInput = [HtmlInputComponent.prefix, HtmlSelectComponent.prefix, HtmlSwitchComponent.prefix,HtmlYeComponent.prefix.toLowerCase,HtmlWangComponent]; // list of gauges tags to check who as events like mouse click static GaugeWithEvents = [HtmlButtonComponent.TypeTag, GaugeSemaphoreComponent.TypeTag, ShapesComponent.TypeTag, ProcEngComponent.TypeTag, ApeShapesComponent.TypeTag]; // list of gauges tags to check who as events like mouse click static GaugeWithActions = [ApeShapesComponent, PipeComponent, ProcEngComponent, ShapesComponent, HtmlButtonComponent, HtmlSelectComponent, ValueComponent, HtmlInputComponent, GaugeSemaphoreComponent,HtmlYeComponent,HtmlWangComponent ]; // list of gauges components static Gauges = [ValueComponent, HtmlInputComponent, HtmlButtonComponent, HtmlBagComponent, HtmlSelectComponent, HtmlChartComponent, GaugeProgressComponent, GaugeSemaphoreComponent, ShapesComponent, ProcEngComponent, ApeShapesComponent, PipeComponent, SliderComponent, HtmlSwitchComponent,HtmlYeComponent,HtmlWangComponent];

    initInEditor(ga: GaugeSettings, res: any, ref: any) { if (ga.type.startsWith(GaugeProgressComponent.TypeTag)) { GaugeProgressComponent.initElement(ga); } else if (ga.type.startsWith(HtmlButtonComponent.TypeTag)) { HtmlButtonComponent.initElement(ga); } else if (ga.type.startsWith(HtmlYeComponent.TypeTag)) { HtmlYeComponent.initElement(ga,true); } else if (ga.type.startsWith(HtmlChartComponent.TypeTag)) { delete this.mapGauges[ga.id]; let gauge = HtmlChartComponent.detectChange(ga, res, ref); this.setChartPropety(gauge, ga.property); this.mapGauges[ga.id] = gauge; } else if (ga.type.startsWith(HtmlBagComponent.TypeTag)) { this.mapGauges[ga.id] = HtmlBagComponent.detectChange(ga, res, ref); } else if (ga.type.startsWith(PipeComponent.TypeTag)) { return this.mapGauges[ga.id] = PipeComponent.detectChange(ga, res, this.winRef); } else if (ga.type.startsWith(SliderComponent.TypeTag)) { return this.mapGauges[ga.id] = SliderComponent.detectChange(ga, res, ref); } else if (ga.type.startsWith(HtmlSwitchComponent.TypeTag)) { return this.mapGauges[ga.id] = HtmlSwitchComponent.detectChange(ga, res, ref); } return false; } `

  5. From the code, I found that the ext-bundle.min.js file should also be modified. Whether the file code is automatically generated and whether there is a method to modify this file.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
unocellicommented, Nov 2, 2021

I will add the chart bar manager in the editor and preparing the components structure ‘html-bargraph’ in a branch ‘bar-graph’. you can contact me 4frango@gmail.com to not fill this issue with comments.

0reactions
unocellicommented, Feb 15, 2022

I added in the latest version the iframe control. you can follow in code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fuxa Tutorial | OpenPLC - YouTube
00:00 - 00:29 Intro 00:29 - 02:26 OpenPLC02:26 - 02:56 Modbus-serial 02:56 - 04:20 Connection04:20 - 10:58 Fuxa EditorFuxa is an open-source ...
Read more >
frangoteam
FUXA allows the effortless creation of industrial web HMIs, SCADA, ... Create your solution visually with pre-defined widgets by using drag&drop.
Read more >
FUXA Alternatives and Similar Sites / Apps - AlternativeTo
With FUXA you can create modern process visualizations with individual designs for your machines and real-time data display' and is an app.
Read more >
Open PLC cocktail maker. - OpenPLC Forum
I first have to change this in the Firmware code and add a "custom" ... USB port connected to a Raspberry Pi running...
Read more >
Davion Fuxa's Content - Goldhawk Interactive
Davion Fuxa replied to Chris's topic in Development Updates ... it all the same - change it so that the player no longer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found