MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Version 7 Cursor for Locators

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93858] Version 7 Cursor for Locators
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 27 Nov 2008 05:31:02 -0500 (EST)

Version 7 has introduced a new cursor type in graphics (at least) that I
will call a 'movable' cursor. It consists of a regular arrow outline with
the addition of a set of very small up/down/left/right arrows near the tail.
I don't know if the documentation gives any information on this but I
surmise that the purpose is to show when the cursor is over a movable
Locator object. That is pretty useful, but I think there is a problem with
it.

 

The 'movable' cursor doesn't show if the graphics consists of nothing but a
single Locator. It shows when we have a Locator plus any other graphical
element(s).

 

The following contains two Locators, a Line between them, and a midpoint.
The 'movable' cursor displays only over the Locators and not over the Line
or Point. This must be the intended and proper behavior.

 

DynamicModule[{pt1 = {-4, -4}, pt2 = {4, 4}},

 Graphics[

  {Dynamic@

    {Line[{pt1, pt2}],

     AbsolutePointSize[5],

     Point[(pt1 + pt2)/2]},

   Locator[Dynamic[pt1]],

   Locator[Dynamic[pt2]]},

  PlotRange -> 10,

  Frame -> True,

  ImageSize -> 200]

 ]

 

But if we Deploy the Graphics display, by any of the available methods, the
'movable' cursor no longer works properly, but displays over ALL graphical
elements. 

 

DynamicModule[{pt1 = {-4, -4}, pt2 = {4, 4}},

 Deploy@Graphics[

   {Dynamic@

     {Line[{pt1, pt2}],

      AbsolutePointSize[5],

      Point[(pt1 + pt2)/2]},

    Locator[Dynamic[pt1]],

    Locator[Dynamic[pt2]]},

   PlotRange -> 10,

   Frame -> True,

   ImageSize -> 200]

 ]

 

This is unfortunate because the 'movable' cursor type is a feature that
conveys useful information, and it is also a nice technique to Deploy
dynamic displays.

 

 

David Park

djmpark at comcast.net

 <http://home.comcast.net/~djmpark> http://home.comcast.net/~djmpark 


  • Prev by Date: Re: Implementation rest modulo 2 needed
  • Next by Date: Re: Solve this differential equation with periodic boundary conditions:
  • Previous by thread: Re: Implementation rest modulo 2 needed
  • Next by thread: Re: Version 7 Cursor for Locators