Commit 9005d4a9 authored by Ivan Dages's avatar Ivan Dages
Browse files

setting the median value applies an offset to the other values

parent 2ecae961
......@@ -175,7 +175,10 @@ public class Axis {
/** Maximum value of the axis. */
private double maxValue;
/** Median value of the axis. */
/**
* Median value of the axis.
* @deprecated The median value is always 0 now, setting this value applies an offset to the current, min and max values
*/
private double medianValue;
/** Transform applied by the user when moving the component along its axis. */
......@@ -184,7 +187,8 @@ public class Axis {
/** Visual group of the axis. */
private Group visualGroup;
/** Transform used convert scene coordinates into parent's coordinates.
/**
* Transform used convert scene coordinates into parent's coordinates.
* This parent is either the parent of the axis' component or the component itself if it is the root.
*/
private Transform sceneToParent;
......@@ -219,6 +223,7 @@ public class Axis {
this.value = a.value;
this.minValue = a.minValue;
this.maxValue = a.maxValue;
this.medianValue = a.medianValue;
this.movementTransform = a.movementTransform.clone();
this.visualGroup = new Group();
this.visualGroup.setVisible(false);
......@@ -285,6 +290,7 @@ public class Axis {
/**
* Gets the median value of the axis
* @return The median value
* @deprecated The median value is always 0 now, setting this value applies an offset to the current, min and max values
*/
public double getMedianValue() {
return medianValue;
......@@ -379,7 +385,10 @@ public class Axis {
* @param medianValue New median value
*/
public void setMedianValue(double medianValue) {
this.medianValue = medianValue;
this.value -= medianValue;
this.minValue -= medianValue;
this.maxValue -= medianValue;
this.medianValue = 0;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment