Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Problem dragging WBShapesToolBar after repositioning

Avatar

Level 3
I'm building an AFCS app using the PureMVC framework. When my
Sharedwhiteboard's Mediator's constructor executes I position the
Sharedwhiteboard component:

whiteboard.x = 500;



From that time onwards I can no longer drag the
WBShapesToolBar to any point that is smaller than x = 500. If I do
not change the x position of the Sharedwhiteboard then I can drag
the toolbar wherever I please.



Could there be a bug in the AFCS SDK? Maybe in the
startDragging method?



Regards,



Stefan

1 Accepted Solution

Avatar

Correct answer by
Level 3
Doh! I should stop working this late. I'm an idiot and tried
moving the whiteboard itself when in fact I wanted to move the
toolbar...



I guess I'll get back to this on monday.



thanks all.

View solution in original post

3 Replies

Avatar

Former Community Member
Hi Stefan,



I am not sure if I understood your question correctly, but
the ShapesToolBar is supposed to remain when dragged within the
boundaries of the WhiteBoard. When my whiteboard is x=0 , it can be
dragged from x=0 y=0 to width and height of whiteboard and when
x=500, from x=500, y=0 to 500+width and height.

Here is a small code i executed. Are you looking for
something else , please let me know and attach a code block if
required.



Thanks

Hironmay Basu



Here is my code

Avatar

Employee
The toolbar is seperate UI component that is added as a child
to the Whiteboard. So it will be forced to remain with in the
boundaries of its parent container (WhiteBoard in this case).



But if you still want it to be outside the container, this
worked for me. But dragging wasnt possible :(. I tried writing a
custom mouseevent like
wb.shapesToolBar.addEventListener(MouseEvent.MOUSE_DOWN,
dragToolBar) and couldnt do anything useful.



<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" xmlns:rtc="AfcsNameSpace" >

<mx:Script>

<![CDATA[

protected function onClick():void

{

wb.x = 500;

wb.shapesToolBar.x = -300;

}

]]>

</mx:Script>



<rtc:ConnectSessionContainer id="cSession" roomURL="
http://connectnow.acrobat.com/username/roomname">

<rtc:authenticator>

<rtc:AdobeHSAuthenticator userName="Login" password="Pwd"
/>

</rtc:authenticator>



<rtc:SharedWhiteBoard id="wb" width="800" height="800"
/>

<mx:Button click="onClick()" label="move" />

</rtc:ConnectSessionContainer>

</mx:Application>

Avatar

Correct answer by
Level 3
Doh! I should stop working this late. I'm an idiot and tried
moving the whiteboard itself when in fact I wanted to move the
toolbar...



I guess I'll get back to this on monday.



thanks all.