Skip to main content
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Source Link

Using the same logic as EdmundEdmund in his answerhis answer.

Manipulate[
  Row[{
   LocatorPane[
    Dynamic[point],
    Plot[x, {x, 0, end}, ImageSize -> 400]],
   "This value should change ONLY when the Locator is dragged: ", 
   Dynamic[point/end]}], 
  {{point, {0.5, 0.5}}, None}, {{scaledPoint, {0.5, 0.5}}, None}, 
  {end, 1, 2, 
   TrackingFunction :> {(scaledPoint = point/end; &), 
    (end = #; point = end*scaledPoint; &), None}}]

outGIF

Using the same logic as Edmund in his answer.

Manipulate[
  Row[{
   LocatorPane[
    Dynamic[point],
    Plot[x, {x, 0, end}, ImageSize -> 400]],
   "This value should change ONLY when the Locator is dragged: ", 
   Dynamic[point/end]}], 
  {{point, {0.5, 0.5}}, None}, {{scaledPoint, {0.5, 0.5}}, None}, 
  {end, 1, 2, 
   TrackingFunction :> {(scaledPoint = point/end; &), 
    (end = #; point = end*scaledPoint; &), None}}]

outGIF

Using the same logic as Edmund in his answer.

Manipulate[
  Row[{
   LocatorPane[
    Dynamic[point],
    Plot[x, {x, 0, end}, ImageSize -> 400]],
   "This value should change ONLY when the Locator is dragged: ", 
   Dynamic[point/end]}], 
  {{point, {0.5, 0.5}}, None}, {{scaledPoint, {0.5, 0.5}}, None}, 
  {end, 1, 2, 
   TrackingFunction :> {(scaledPoint = point/end; &), 
    (end = #; point = end*scaledPoint; &), None}}]

outGIF

added 66 characters in body
Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135

Using the same logic as Edmund in his answer.

Manipulate[
  Row[{
   LocatorPane[
    Dynamic[point],
    Plot[x, {x, 0, end}, ImageSize -> 400]],
   "This value should change ONLY when the Locator is dragged: ", 
   Dynamic[point/end]}], 
  {{point, {0.5, 0.5}}, None}, {{scaledPoint, {0.5, 0.5}}, None}, 
  {end, 1, 2, 
   TrackingFunction :> {(scaledPoint = point/end; &), 
    (end = #; point = end*scaledPoint; &), None}}]

outGIF

Using the same logic as Edmund in his answer.

Manipulate[
  Row[{
   LocatorPane[
    Dynamic[point],
    Plot[x, {x, 0, end}, ImageSize -> 400]],
   "This value should change ONLY when the Locator is dragged: ", 
   Dynamic[point/end]}], 
  {{point, {0.5, 0.5}}, None}, {{scaledPoint, {0.5, 0.5}}, None}, 
  {end, 1, 2, 
   TrackingFunction :> {(scaledPoint = point/end; &), 
    (end = #; point = end*scaledPoint; &), None}}]

Using the same logic as Edmund in his answer.

Manipulate[
  Row[{
   LocatorPane[
    Dynamic[point],
    Plot[x, {x, 0, end}, ImageSize -> 400]],
   "This value should change ONLY when the Locator is dragged: ", 
   Dynamic[point/end]}], 
  {{point, {0.5, 0.5}}, None}, {{scaledPoint, {0.5, 0.5}}, None}, 
  {end, 1, 2, 
   TrackingFunction :> {(scaledPoint = point/end; &), 
    (end = #; point = end*scaledPoint; &), None}}]

outGIF

Source Link
Karsten7
  • 27.6k
  • 5
  • 74
  • 135

Using the same logic as Edmund in his answer.

Manipulate[
  Row[{
   LocatorPane[
    Dynamic[point],
    Plot[x, {x, 0, end}, ImageSize -> 400]],
   "This value should change ONLY when the Locator is dragged: ", 
   Dynamic[point/end]}], 
  {{point, {0.5, 0.5}}, None}, {{scaledPoint, {0.5, 0.5}}, None}, 
  {end, 1, 2, 
   TrackingFunction :> {(scaledPoint = point/end; &), 
    (end = #; point = end*scaledPoint; &), None}}]