I have some UI that "requires" the snapTo functionality but I am stuck with one issue - whenever I add the peer to be shown, the rest of the layout gets shifted. Is there any way to have the peer just show on top of whatever is already in place? Kind of like the rollOverCanvas on the listgrid.
Run the sample and click on the button - you'll notice the button shift to the right.
Run the sample and click on the button - you'll notice the button shift to the right.
Code:
// -------------------------------- // Simple snap to isc.Canvas.create({ ID:"snapContainer", height: 300, width: 400, minHeight:280, minWidth:280, showEdges:true, edgeImage:"edges/custom/sharpframe_10.png", edgeSize:10, edgeMarginSize:10, overflow:"hidden", canDragResize: true }); isc.Label.create({ ID:"label1", height: 80, width: 80, contents: "Top Left", align: "center", backgroundColor: "#FFAAAA", border: "1px solid black", snapTo:"TR",visibility:"hidden", snapOffsetLeft: 80 }); isc.HLayout.create({ members:[ isc.HLayout.create({ ID: "controlLayout", membersMargin: 20, height: 800, members: [ snapContainer ] }), isc.Button.create({ID:"test", left: 400, title:"TESTING POSITION",click: function(){snapContainer.addPeer(label1);label1.bringToFront();}}) ]});
Comment