« Return to Thread: [Magnetics Grid] Magnet effect only for rows or cols

Re: [Magnetics Grid] Magnet effect only for rows or cols

by russe blanc :: Rate this Message:

Reply to Author | View in Thread

Maybe I don't explain myself very well. :)

The orientation property limits the direction in which the object can move but it is not what I want.

I want the object to be movable in both directions, but I want to have only magnetic vertical lines or only magnetic horizontal lines (that is, either blue lines or red lines, but not both).

Thanks.


Alex



Cyril Balit wrote:
Hello,

You can add an orientation property in your the movingLimits section
that can have 3 values:

orientation='2D'  for a 2D drag
orientation='h' for only horizontal drag
orientation='v' for only vertical drag

and those properties can be mixed with the magnetic grid


Cyril


--- In rialto-dev@yahoogroups.com, russe blanc <a.rosano@...> wrote:
>
>
> Hello,
>
> I'm trying to use the magnetics grid feature when we drag and drop an
> object.
> Is it possible to make the magnet effect available only for cols or
only for
> rows (not both) ?
> I'm using Rialto v0.9.
> My code looks like this :
>
>
>
> var setup = {bSelectMark : false,
>     bMUpAction : false,
>          bRectLim : withMagneticGrid,
>            ghost: {aspect: 'rect'},
>     domainTargets: 'myDomain',
>     movingLimits: {oHtmlRef: document.getElementById('myFrame')},
>     magneticsGrid: {heightRow: 40}};
>
> rialto.widgetBehavior.affect(oHtml, 'Missile', setup);
>
>
>
> Thanks.
> --
> View this message in context:
http://www.nabble.com/-Magnetics-Grid--Magnet-effect-only-for-rows-or-co\
ls-tp17596581p17596581.html
> Sent from the Rialto-Development mailing list archive at Nabble.com.
>

 « Return to Thread: [Magnetics Grid] Magnet effect only for rows or cols

LightInTheBox - Buy quality products at wholesale price!