Ver código fonte

Allow changing h2d.flow scroll wheel speed

Leonardo Jeanteur 3 anos atrás
pai
commit
667cfdfa49
2 arquivos alterados com 6 adições e 1 exclusões
  1. 1 1
      h2d/Flow.hx
  2. 5 0
      h2d/domkit/BaseComponents.hx

+ 1 - 1
h2d/Flow.hx

@@ -502,7 +502,7 @@ class Flow extends Object {
 	/**
 	 	The amount of scrolling that is done when using mouse wheel (in pixels).
 	**/
-	public var scrollWheelSpeed(default, null) : Float = 30.;
+	public var scrollWheelSpeed : Float = 30.;
 	/**
 	 	The current scrolling position for the flow content (in pixels). Only applies when overflow is Scroll or Hidden.
 	**/

+ 5 - 0
h2d/domkit/BaseComponents.hx

@@ -749,6 +749,7 @@ class FlowComp extends ObjectComp implements domkit.Component.ComponentDecl<h2d.
 	@:p var fillWidth: Bool;
 	@:p var fillHeight: Bool;
 	@:p var overflow: h2d.Flow.FlowOverflow;
+	@:p var scrollWheelSpeed: Float;
 	@:p var reverse : Bool;
 
 	@:p(align) var contentAlign : { h : h2d.Flow.FlowAlign, v : h2d.Flow.FlowAlign };
@@ -926,6 +927,10 @@ class FlowComp extends ObjectComp implements domkit.Component.ComponentDecl<h2d.
 		}
 	}
 
+	static function set_scrollWheelSpeed( o : h2d.Flow, v ) {
+		o.scrollWheelSpeed = v;
+	}
+
 	static function set_reverse( o : h2d.Flow, v ) {
 		o.reverse = v;
 	}