royale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject [royale-asjs] branch develop updated: Adjusted calculation to remove unnecessary offset.
Date Wed, 10 Jan 2018 13:35:55 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/develop by this push:
     new 02f0dd4  Adjusted calculation to remove unnecessary offset.
02f0dd4 is described below

commit 02f0dd49abf4985593d91c137c68a96310fcb360
Author: Peter Ent <pent@apache.org>
AuthorDate: Wed Jan 10 08:37:32 2018 -0500

    Adjusted calculation to remove unnecessary offset.
---
 .../apache/royale/html/beads/controllers/HSliderMouseController.as   | 5 ++---
 .../apache/royale/html/beads/controllers/VSliderMouseController.as   | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/controllers/HSliderMouseController.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/controllers/HSliderMouseController.as
index 9f8c606..7d77652 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/controllers/HSliderMouseController.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/controllers/HSliderMouseController.as
@@ -294,12 +294,11 @@ package org.apache.royale.html.beads.controllers
         COMPILE::JS
         private function calcValFromMousePosition(event:BrowserEvent, useOffset:Boolean):void
         {
-            var deltaX:Number = event.screenX - mouseOrigin;//(useOffset ? event.offsetX
: event.clientX) - mouseOrigin;
+            var deltaX:Number = event.screenX - mouseOrigin;
 			if (deltaX == 0) return;
 			
             var thumbW:int = parseInt(thumb.element.style.width, 10) / 2;
-            var newX:Number = thumbOrigin + deltaX;
-			var newPointX:Number = newX + thumbW; // center of the thumb which represents the value
+			var newPointX:Number = thumbOrigin + deltaX;
 			
 			var useWidth:Number = parseInt(track.element.style.width,10) * 1.0;
 			var p:Number = newPointX / useWidth;
diff --git a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/controllers/VSliderMouseController.as
b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/controllers/VSliderMouseController.as
index fff4817..794b975 100644
--- a/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/controllers/VSliderMouseController.as
+++ b/frameworks/projects/Basic/src/main/royale/org/apache/royale/html/beads/controllers/VSliderMouseController.as
@@ -278,12 +278,11 @@ package org.apache.royale.html.beads.controllers
 		COMPILE::JS
 		private function calcValFromMousePosition(event:BrowserEvent, useOffset:Boolean):void
 		{
-			var deltaY:Number = event.screenY - mouseOrigin; //(useOffset ? event.offsetY : event.clientY)
- mouseOrigin;
+			var deltaY:Number = event.screenY - mouseOrigin;
 			if (deltaY == 0) return;
 			
 			var thumbH:int = parseInt(thumb.element.style.height, 10) / 2;
-			var newY:Number = thumbOrigin + deltaY;
-			var newPointY:Number = newY + thumbH; // center of the thumb which represents the value
+			var newPointY:Number = thumbOrigin + deltaY;
 			
 			var useHeight:Number = parseInt(track.element.style.height,10) * 1.0;
 			var p:Number = newPointY / useHeight;

-- 
To stop receiving notification emails like this one, please contact
['"commits@royale.apache.org" <commits@royale.apache.org>'].

Mime
View raw message