You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ca...@apache.org on 2019/03/17 17:40:35 UTC

[royale-asjs] branch feature/jewel_positioner updated: fix jewel slider positioner

This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch feature/jewel_positioner
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/feature/jewel_positioner by this push:
     new fd1f06e  fix jewel slider positioner
fd1f06e is described below

commit fd1f06e63773af1b6a4bad7db52e0435edc47162
Author: Carlos Rovira <ca...@apache.org>
AuthorDate: Sun Mar 17 18:40:28 2019 +0100

    fix jewel slider positioner
---
 .../main/royale/org/apache/royale/jewel/Slider.as  | 30 ++++++++++++++--------
 1 file changed, 20 insertions(+), 10 deletions(-)

diff --git a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
index 40bef90..eea650a 100644
--- a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
+++ b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/Slider.as
@@ -198,17 +198,27 @@ package org.apache.royale.jewel
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-			var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
-            
-            var input:HTMLInputElement = addElementToWrapper(this,'input') as HTMLInputElement;
-            input.setAttribute('type', 'range');
-			
-			div.appendChild(input);
-
-            positioner = div as WrappedHTMLElement;
-            positioner.royale_wrapper = this;
-			
+			addElementToWrapper(this,'input') as HTMLInputElement;
+            element.setAttribute('type', 'range');
+			positioner = document.createElement('div') as WrappedHTMLElement;
 			return element;
         }
+
+		COMPILE::JS
+		private var _positioner:WrappedHTMLElement;
+
+		COMPILE::JS
+		override public function get positioner():WrappedHTMLElement
+		{
+			return _positioner;
+		}
+
+		COMPILE::JS
+		override public function set positioner(value:WrappedHTMLElement):void
+		{
+			_positioner = value;
+            _positioner.royale_wrapper = this;
+			_positioner.appendChild(element);
+		}
     }
 }