Skip to content

Commit

Permalink
get y should return this._y in GradientSlider.js
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=274094

Reviewed by Devin Rousso.

Delete get y() and set (y).
Add this._updateTransform() in _handleMousemove because set y() was removed where it was originally set.

* Source/WebInspectorUI/UserInterface/Views/GradientSlider.js:
(WI.GradientSliderKnob.prototype._handleMousemove):
(WI.GradientSliderKnob.prototype.get y): Deleted.
(WI.GradientSliderKnob.prototype.set y): Deleted.

Canonical link: https://commits.webkit.org/278904@main
  • Loading branch information
francescorn authored and stwrt committed May 17, 2024
1 parent 0555bbd commit 5ab59d6
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions Source/WebInspectorUI/UserInterface/Views/GradientSlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,16 +317,6 @@ WI.GradientSliderKnob = class GradientSliderKnob extends WI.Object
this._updateTransform();
}

get y()
{
return this._x;
}

set y(y) {
this._y = y;
this._updateTransform();
}

get wellColor()
{
return this._wellColor;
Expand Down Expand Up @@ -414,9 +404,10 @@ WI.GradientSliderKnob = class GradientSliderKnob extends WI.Object
x = Math.min(Math.max(0, x), w);
this.x = x;

if (this._detaching)
this.y = event.pageY - this._startMouseY;
else if (this.delegate && typeof this.delegate.knobXDidChange === "function")
if (this._detaching) {
this._y = event.pageY - this._startMouseY;
this._updateTransform();
} else if (this.delegate && typeof this.delegate.knobXDidChange === "function")
this.delegate.knobXDidChange(this);
}

Expand Down

0 comments on commit 5ab59d6

Please sign in to comment.