Skip to content
Permalink
Browse files

bugfix Mouse location

  • Loading branch information
felipevex committed Oct 29, 2019
1 parent 3676335 commit 73b4af89c40ad1ff666f636384055ed271301a44
@@ -43,7 +43,7 @@ class PriMap {

public function remove(key:String):Void this.set(key, null);

inline public function getValue():String {
public function getValue():String {
var c:String = "";

for (item in this.values) c += item;
@@ -68,7 +68,7 @@ typedef DisplayHelper = {
var visible:Bool;
var mouseEnabled:Bool;

var dragdata:DragData;
@:optional var dragdata:DragData;

var anchorX:Float;
var anchorY:Float;
@@ -78,11 +78,11 @@ typedef DisplayHelper = {
var alpha:Float;
var disabled:Bool;

var element:JQuery;
var elementBorder:Element;
var jselement:Element;
@:optional var element:JQuery;
@:optional var elementBorder:Element;
@:optional var jselement:Element;

var parent:PriContainer;
@:optional var parent:PriContainer;

var eventHelper:BrowserEventEngine;

@@ -47,8 +47,6 @@ class DisplayHelperIgnition {
visible : true,
mouseEnabled : true,

dragdata : null,

anchorX : 0.5,
anchorY : 0.5,
rotation : 0,
@@ -57,12 +55,6 @@ class DisplayHelperIgnition {
alpha : 1,
disabled : false,

element : null,
elementBorder : null,
jselement : null,

parent : null,

eventHelper : new BrowserEventEngine(),
styles : map,
styleString : "",
@@ -79,7 +79,7 @@ class PriApp extends PriGroup {
Browser.window.document.addEventListener("touchmove", this.___onPointerMove, true);

Browser.window.document.addEventListener("mousedown", this.___onPointerMove, true);
Browser.window.document.addEventListener("touchmove", this.___onPointerMove, true);
Browser.window.document.addEventListener("mousemove", this.___onPointerMove, true);

Browser.window.document.addEventListener("focus", this.___onAppFocusIn, true);
Browser.window.document.addEventListener("blur", this.___onAppFocusOut, true);
@@ -202,6 +202,5 @@ class PriApp extends PriGroup {
private function ___onAppFocusIn():Void this.___hasFocus = true;
private function ___onAppFocusOut():Void this.___hasFocus = false;
override public function hasFocus():Bool return this.___hasFocus;



}
@@ -193,13 +193,15 @@ class PriDisplay extends PriEventDispatcher {

@:noCompletion
private function __updateStyle():Void {
if (this.dh.holdStyleUpdate || this.dh.jselement == null) return;
var dh = this.dh;

var result:String = this.dh.styles.getValue();
if (dh.holdStyleUpdate || dh.jselement == null) return;

if (result != this.dh.styleString) {
this.dh.styleString = result;
this.dh.jselement.style.cssText = result;
var result:String = dh.styles.getValue();

if (result != dh.styleString) {
dh.styleString = result;
dh.jselement.style.cssText = result;
}

}
@@ -493,7 +495,7 @@ class PriDisplay extends PriEventDispatcher {
this.dh.styles.set("left", value + "px");

this.__updateStyle();

return value;
}

@@ -482,7 +482,7 @@ private class PriBuilderMacroHelper {

// ^0x[0-9a-fA-F]+$ : match hexadecimal numbers
// | or
// ^-?[0-9]*.?[0-9]+$ negatives, positives, floats or integers
// ^-?[0-9]*.?[0-9]+$ hexa, negatives, positives, floats or integers
var r = new EReg("^0x[0-9a-fA-F]+$|^-?[0-9]*.?[0-9]+$", "");

return r.match(StringTools.trim(value));

0 comments on commit 73b4af8

Please sign in to comment.
You can’t perform that action at this time.