소스 검색

added vertical support

David Catuhe 6 년 전
부모
커밋
52f193073a
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      gui/src/2D/controls/imageBasedSlider.ts

+ 8 - 0
gui/src/2D/controls/imageBasedSlider.ts

@@ -83,6 +83,14 @@ export class ImageBasedSlider extends BaseSlider {
             // Background
             if (this._backgroundImage) {
                 this._tempMeasure.copyFromFloats(left, top, width, height);
+                if (this.isThumbClamped) {
+                    if (this.isVertical) {
+                        this._tempMeasure.height += this._effectiveThumbThickness;
+                    } else {
+                        this._tempMeasure.width += this._effectiveThumbThickness;
+                    }
+
+                }
                 this._backgroundImage._draw(this._tempMeasure, context);
             }