[Magnetics Grid] Magnet effect only for rows or cols

View: New views
7 Messages — Rating Filter:   Alert me  

[Magnetics Grid] Magnet effect only for rows or cols

by russe blanc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

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

by Cyril Balit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@..., 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.
>



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

by russe blanc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.
>


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

by François Lion :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

You want keep the limits of movement but
only one of both lines  must be drawn.
=
A single line (horizontal or vertical) must be drawn
but with the magnetic effect in both directions.

Is it that you want?

François


--- In rialto-dev@..., russe blanc <a.rosano@...> wrote:
>
>
> 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@..., 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.
> >>
> >
> >
> >
> >
>
> --
> View this message in context:
http://www.nabble.com/-Magnetics-Grid--Magnet-effect-only-for-rows-or-cols-tp17596581p17597180.html
> Sent from the Rialto-Development mailing list archive at Nabble.com.
>



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

by russe blanc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's it.
Except I don't want a "single" line but multiple lines (as I said, only vertical ones, or only horizontal ones).

As far as I have seen, Rialto allows only a full magnetic grid (horizontal guides and vertical guides) or no grid at all.



Alex



François Lion wrote:
Hello,

You want keep the limits of movement but
only one of both lines  must be drawn.
=
A single line (horizontal or vertical) must be drawn
but with the magnetic effect in both directions.

Is it that you want?

François


--- In rialto-dev@yahoogroups.com, russe blanc <a.rosano@...> wrote:
>
>
> 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.
> >>
> >
> >
> >
> >
>
> --
> View this message in context:
http://www.nabble.com/-Magnetics-Grid--Magnet-effect-only-for-rows-or-cols-tp17596581p17597180.html
> Sent from the Rialto-Development mailing list archive at Nabble.com.
>


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

by François Lion :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello Alex,

OK, I added a parameter for this feature: limitsDisplayed.
It's an attribute of magneticsGrid setup object.
The default value is "2D" and the others "h" or "v" (case insensitive)

example, to see only the horizontals lines:
var withMagneticGrid = true;
var oHtml = document.getElementById("myMissile");
var setup = {bSelectMark : false,
 bMUpAction : false,
 bRectLim : withMagneticGrid,
 ghost: {aspect: 'rect'},
 domainTargets: 'myDomain',
 movingLimits: {oHtmlRef: document.getElementById('myFrame')},
 magneticsGrid: {heightRow: 40, limitsDisplayed:"h"}
};

You must update your rialto.js.

Regards,
François

--- In rialto-dev@..., russe blanc <a.rosano@...> wrote:
>
>
> That's it.
> Except I don't want a "single" line but multiple lines (as I said, only
> vertical ones, or only horizontal ones).
>
> As far as I have seen, Rialto allows only a full magnetic grid
(horizontal

> guides and vertical guides) or no grid at all.
>
>
>
> Alex
>
>
>
>
> François Lion wrote:
> >
> > Hello,
> >
> > You want keep the limits of movement but
> > only one of both lines  must be drawn.
> > =
> > A single line (horizontal or vertical) must be drawn
> > but with the magnetic effect in both directions.
> >
> > Is it that you want?
> >
> > François
> >
> >
> > --- In rialto-dev@..., russe blanc <a.rosano@> wrote:
> >>
> >>
> >> 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@..., 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.
> >> >>
> >> >
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >
http://www.nabble.com/-Magnetics-Grid--Magnet-effect-only-for-rows-or-cols-tp17596581p17597180.html
> >> Sent from the Rialto-Development mailing list archive at Nabble.com.
> >>
> >
> >
> >
> >
>
> --
> View this message in context:
http://www.nabble.com/-Magnetics-Grid--Magnet-effect-only-for-rows-or-cols-tp17596581p17616987.html
> Sent from the Rialto-Development mailing list archive at Nabble.com.
>



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

by russe blanc :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Thanks François, it works fine.

Alex



François Lion wrote:
Hello Alex,

OK, I added a parameter for this feature: limitsDisplayed.
It's an attribute of magneticsGrid setup object.
The default value is "2D" and the others "h" or "v" (case insensitive)

example, to see only the horizontals lines:
var withMagneticGrid = true;
var oHtml = document.getElementById("myMissile");
var setup = {bSelectMark : false,
 bMUpAction : false,
 bRectLim : withMagneticGrid,
 ghost: {aspect: 'rect'},
 domainTargets: 'myDomain',
 movingLimits: {oHtmlRef: document.getElementById('myFrame')},
 magneticsGrid: {heightRow: 40, limitsDisplayed:"h"}
};

You must update your rialto.js.

Regards,
François

--- In rialto-dev@yahoogroups.com, russe blanc <a.rosano@...> wrote:
>
>
> That's it.
> Except I don't want a "single" line but multiple lines (as I said, only
> vertical ones, or only horizontal ones).
>
> As far as I have seen, Rialto allows only a full magnetic grid
(horizontal
> guides and vertical guides) or no grid at all.
>
>
>
> Alex
>
>
>
>
> François Lion wrote:
> >
> > Hello,
> >
> > You want keep the limits of movement but
> > only one of both lines  must be drawn.
> > =
> > A single line (horizontal or vertical) must be drawn
> > but with the magnetic effect in both directions.
> >
> > Is it that you want?
> >
> > François
> >
> >
> > --- In rialto-dev@yahoogroups.com, russe blanc <a.rosano@> wrote:
> >>
> >>
> >> 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.
> >> >>
> >> >
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >
http://www.nabble.com/-Magnetics-Grid--Magnet-effect-only-for-rows-or-cols-tp17596581p17597180.html
> >> Sent from the Rialto-Development mailing list archive at Nabble.com.
> >>
> >
> >
> >
> >
>
> --
> View this message in context:
http://www.nabble.com/-Magnetics-Grid--Magnet-effect-only-for-rows-or-cols-tp17596581p17616987.html
> Sent from the Rialto-Development mailing list archive at Nabble.com.
>

LightInTheBox - Buy quality products at wholesale price