Quantcast
Channel: Northwoods Software - Latest topics
Viewing all articles
Browse latest Browse all 7421

Unable to get actual bounds of adornment when binding the "visible" event to a function

$
0
0

@Abhishek wrote:

Some times i am not getting some properties of the actual bounds on visible event.
perfect condition is like this for adorn.actualBounds

  1. $: 330.15000000000003
  2. G: 895
  3. H: 52.80827490204163
  4. aa: 251.22
  5. u: false

But mostly i am getting this .

  1. $: 330.15000000000003

  2. G: 0

  3. H: 0

  4. aa: 251.22

  5. u: false

     function onVisible(adorn){
         If(adorn.actualBounds.Top && adorn.actualBounds.Bottom){
            //DoSome stuff with bounds
            //this code only runs once when the figure is droped from palette to diagram and after that on all selection events we don't get actual bounds when it is becoming visible.
         }
     }
             
     $(go.Node, 
                   "Spot", nodeStyle(),  
                   {
                     selectionAdornmentTemplate:  // custom selection adornment
                     $(go.Adornment, "Spot",      
                     $(go.Placeholder),
                     $(go.Shape, 
                       {
                         geometryString: CustomFigures.SVGpath,
                         alignment: go.Spot.Center,
                         alignmentFocus: go.Spot.Left,
                         stroke: "pink"
                       }),
                      new go.Binding("visible", "", onVisible).ofObject()
                     )        
                   },....

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7421

Trending Articles