engageLively / galyleo-dashboard

3 stars 2 forks source link

Connector on DoubleSliderFilter is misaligned #106

Open rickmcgeer opened 1 year ago

rickmcgeer commented 1 year ago

The connector between the knobs on a double slider was misaligned and appeared above the slider bar. Fixed with a one-line change to DoubleSliderModel. The previous updateConnector was:

 updateConnector () {
    const { connector: conn, maxKnob, minKnob } = this.ui;
    conn.width = maxKnob.center.subPt(minKnob.center).x;
    conn.left = minKnob.center.x;
 }

Current is:

 updateConnector () {
    const { connector: conn, maxKnob, minKnob, sliderCenter } = this.ui;
    conn.width = maxKnob.center.subPt(minKnob.center).x;
    conn.left = minKnob.center.x;
    conn.position.y = sliderCenter.position.y;
 }

@merryman, please review in $world.execCommand("open browser", {moduleName: "studio/side-bar.cp.js", packageName: "galyleo-dashboard", codeEntity: "GalyleoSideBar"}); and I will close