aaguerra / oryx-editor

Automatically exported from code.google.com/p/oryx-editor
0 stars 0 forks source link

shape menu disabled for elements having no morphing rules #481

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a stencilset with connection rules
2. add morphing rules for some (not all) the elements having connection rules

What is the expected output?
All elements having the connection rules should show the shape menu

What do you see instead?
The elements having connection rules *and no morphing rules* do not show the 
shape menu when the user select them.

Please provide any additional information below.
A hack that fixes this problem is provided here : 
https://gist.github.com/1078057
This bug is due to the wrong use of 
ORYX.Core.StencilSet.Rules.prototype.containsMorphingRules in 
ORYX.Plugins.ShapeMenuPlugin.showStencilButtons. 
Indeed, containsMorphingRules returns the existance of morphing rules for any 
elements in the stencilsets. But, what we want in showStencilButtons is a 
boolean (isMorphing) that is true when a morphing rule exists for the 
*selected* elements.

Original issue reported on code.google.com by florent....@gmail.com on 12 Jul 2011 at 2:23