Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Using SnapTo with snapOffsetLeft on a rollOverCanvas

    Hi,

    I'm trying to set an offset to a rollOverCanvas which has SnapTo="R" - it seems the snapOffsetLeft is ignored.

    I check this on the example at https://www.smartclient.com/smartcli...lloverControls
    and added snapOffsetLeft: -10
    BTW - I eventually want to use this with useCellRollOvers and getFrozenRollOverCanvas but it seems to behave the same as regular row-level rollovers to I'm using the simpler example here.

    Here is the code:
    Code:
    isc.ListGrid.create({
        ID:"countryList",
        width:520, height:224,
        data: countryData,
        selectionType:"single",
        fields:[
            {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
            {name:"countryName", title:"Country"},
            {name:"capital", title:"Capital"},
            {name:"continent", title:"Continent"}
        ],
        showRollOverCanvas:true,
        showRollUnderCanvas:false, // disable the rollUnderCanvas because we're not using it
        rollOverCanvasConstructor:isc.HLayout,
        rollOverCanvasProperties:{
            snapTo:"R", height:20, width:55,
    [B]snapOffsetLeft: -10, // This seems to be ignored![/B]
            members:[
                {_constructor:"Button", title:"+",
                 click:"isc.say('Expanded record:' + this.echo(this.parentElement.record))",
                 height:20, width:27},
                {_constructor:"Button", title:"-",
                 click:"isc.say('Collapsed record:' + this.echo(this.parentElement.record))",
                 height:20, width:27}
            ]
        }
    });
    Am I missing something?

    Thanks
    Gil
    Last edited by gedri; 2 Dec 2019, 22:12. Reason: fixed typo in the example code - "snapToOffset" => "snapOffsetLeft"

    #2
    In this code you've got a typo "snapToOffset" rather than "snapOffsetLeft", but we agree that at a first look, this appears not to be behaving as expected.
    We'll have a developer take a look. In the meantime, you could fix this easily by adding the space to the embedded layout itself (for example, add a 10px wide LayoutSpacer after the second button)

    Regards
    Isomorphic Software

    Comment


      #3
      Oops - yes, during my attempts to build the example, I got the property name mixed-up, but as you identified, the problem does seem to exist with the correct property name.
      I'll edit my original post for future reference.
      The workaround is clear, but if the problem could be fixed soon, then I'll wait for the fix.

      Thanks

      Comment


        #4
        A fix for your sample has been committed and will be available in builds as of Dec 4 for versions back to 11.1.

        Regards
        Isomorphic Software

        Comment

        Working...
        X