From 02859534b658395ef0d3405314089480229eca89 Mon Sep 17 00:00:00 2001
From: Armand Bahi <armand.bahi@veremes.com>
Date: Fri, 18 Jan 2019 09:40:09 +0100
Subject: [PATCH] =?UTF-8?q?Resolve=20"[ANC]=20Rotation=20des=20symboles=20?=
 =?UTF-8?q?dans=20la=20partie=20sch=C3=A9ma=20de=20l'onglet=20contr=C3=B4l?=
 =?UTF-8?q?e"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ...c_saisie_anc_controle_controle_schema.json | 39 ++++++++++++-------
 .../externs/formReader/formReaderDrtv.js      |  4 +-
 2 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_schema.json b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_schema.json
index 6b4ecd01..3c173b8f 100755
--- a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_schema.json
+++ b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_schema.json
@@ -111,11 +111,11 @@
                         "attributes_def": [{
                                 "label": "Type",
                                 "name": "composant_type"
-                            }, 
+                            },
                             {
                                 "label": "Nom",
                                 "name": "label"
-                            }, 
+                            },
                             {
                                 "label": "Observations",
                                 "name": "observations"
@@ -216,27 +216,36 @@
                                         {
                                             "fields": [
                                                 {
-                                                    "type": "number",
-                                                    "label": "Taille",
+                                                    "type": "slider",
                                                     "name": "size",
-                                                    "required": false,
-                                                    "default_value": 50,
-                                                    "nb_cols": 12
+                                                    "label": "Taille",
+                                                    "nb_cols": 12,
+                                                    "options": {
+                                                        "min": 0,
+                                                        "max": 300,
+                                                        "precision": 1,
+                                                        "step": 1
+                                                    },
+                                                    "default_value": 50
                                                 }
                                             ]
-                                        }, 
+                                        },
                                         {
                                             "fields": [
                                                 {
-                                                    "type": "text",
-                                                    "label": "Angle",
+                                                    "type": "slider",
                                                     "name": "rotation",
-                                                    "required": false,
-                                                    "default_value": 0,
-                                                    "nb_cols": 12
+                                                    "label": "Angle",
+                                                    "nb_cols": 12,
+                                                    "options": {
+                                                        "min": 0,
+                                                        "max": 360,
+                                                        "precision": 1,
+                                                        "step": 1
+                                                    }
                                                 }
                                             ]
-                                        }, 
+                                        },
                                         {
                                             "fields": [
                                                 {
@@ -300,4 +309,4 @@
         ],
         "event": "sendSimpleForm()"
     }
-}
\ No newline at end of file
+}
diff --git a/src/vitis/client/javascript/externs/formReader/formReaderDrtv.js b/src/vitis/client/javascript/externs/formReader/formReaderDrtv.js
index 7d3a99d1..342087b6 100644
--- a/src/vitis/client/javascript/externs/formReader/formReaderDrtv.js
+++ b/src/vitis/client/javascript/externs/formReader/formReaderDrtv.js
@@ -1350,7 +1350,9 @@ formReader.appFormFieldSpecificParamsDrtv = function ($timeout, $translate, prop
                         scope['oFormValues'][scope['sFormDefinitionName']][scope['field']['name']] = 0;
                     // Quand le slider change par l'action de l'utilisateur
                     $(element).on('slide', function () {
-                        scope['oFormValues'][scope['sFormDefinitionName']][scope['field']['name']] = $(element)['slider']('getValue');
+                        scope.$applyAsync(function(){
+                            scope['oFormValues'][scope['sFormDefinitionName']][scope['field']['name']] = $(element)['slider']('getValue');
+                        });
                     });
                     // Quand la valeur dans oFormValues du slider change
                     scope.$watch('oFormValues.' + scope['sFormDefinitionName'] + '["' + scope['field']['name'] + '"]', function () {
-- 
GitLab