witsa / synapps

Construisez des apps standards, adaptatives et multiplateformes avec le REDY
11 stars 3 forks source link

[COMPOSITE] Icones Normal/Défaut avec Couleurs #526

Closed edejean closed 2 years ago

edejean commented 2 years ago

Bonjour,

Et si je veux la même chose sur le fond, un cadre vert légèrement transparent entourant par exemple un disjoncteur et passant au rouge clignotant une fois déclenchée ? (pas besoin de l'îcone...)

Cdt Eric

Discussed in https://github.com/witsa/synapps/discussions/500

Originally posted by **WITNicolas** June 3, 2022 Un Composite qui permet de choisir 2 logos (Normal/Défaut) ainsi que 2 couleurs (Normal/Defaut). En mode Défaut, le logo clignote. Il suffit de liaisonner la variable etatDefaut ![defClignotant](https://user-images.githubusercontent.com/33632664/171877744-4611ceb4-8052-48c3-8d8f-f8fa411c5734.gif) A coller dans les composites. ````text SYNAPPS-STUDIO-COMPOSITE|{"config":{"key":"defClignotant","name":"defClignotant","properties":{"fontSize":"2em"},"additionalDefs":{"iconNOK":{"type":"icon","helperTxt":"Logo Actif","canBeEmpty":false,"value":"danger"},"iconOK":{"type":"icon","helperTxt":"Logo Inactif","value":"circleselect"},"colorNOK":{"type":"color","helperTxt":"Couleur Etat Défaut","value":"red"},"colorOK":{"type":"color","helperTxt":"Couleur Etat Normal","value":"green"},"etatDefaut":{"type":"boolean","description":"Lien du Défaut","value":false}}},"leadActor":{"type":"layout/stack","key":"stackRoot","children":[{"type":"display/html","key":"def","properties":{"content":"\n\n","color":"red","top":"470px","left":"1080px","classNames":"blink","fontSize":"3em"},"additionalDefs":{"icon":{"type":"icon","label":"Icône","description":"Web Hosting Hub Glyphs"}},"additionals":{"icon":"danger"},"bindings":{"additionals.icon":"stage@properties.etatDefaut","properties.color":"stage@properties.etatDefaut","properties.classNames":"stage@properties.etatDefaut"},"events":{"additionals/icon/binding/onReadTransform":["return context.value ? this.stage.properties.iconNOK : this.stage.properties.iconOK;"],"properties/color/binding/onReadTransform":["return context.value ? this.stage.properties.colorNOK : this.stage.properties.colorOK;"],"properties/classNames/binding/onReadTransform":["return context.value ? \"blink\":\"\";"]}}]}} ````
manufitoussiwit commented 2 years ago

Salut ! voir la réponse ici : https://github.com/witsa/synapps/discussions/500#discussioncomment-3316890