[
https://issues.jboss.org/browse/DROOLS-3406?page=com.atlassian.jira.plugi...
]
Roger Martínez commented on DROOLS-3406:
----------------------------------------
Hey [~manstis]
Well probably I'm still not familiar with this things you're doing and the issues
behind, as we never did something like this before on to of Stunner shapes... So good to
see you are feeling brave hehe :) I'll help as much as possible.
Soo some comments:
* TBH I don't understand how the actual resize stuff works for a Line, I mean by using
_view.addHandler(ViewEventType.RESIZE, new ResizeHandler()...)_ . Are really the resize
CPs appearing? on top of the line? and what's being resized? Can you please attach
some screenshot or video?? it would help to have an idea...
* About (a) - Add a CP to the line and fire some commands
** I see two parts here - the lienzo and stunner sides
** On lienzo size it's necessary to implement this new CP and its behavior in some way
- maybe implementing the IControlHandle interface as others? not really sure if makes
sense, but once given the ability, for your shape, to show/hide the CP, it should also
provide some callback to let stunner know the CP has been "updated". As usually
you can do this in different ways... options could be using an interface (like we do with
the IContainmentAcceptor etc) or using the event bus by creating your own eventhandlers.
** On Stunner side I would implement a new "CavnasControl" and register it to
your DMNSession.
** This way, once the control is enabled, it checks the elements being
[
registered|https://github.com/kiegroup/kie-wb-common/blob/master/kie-wb-c...]
on the diagram/canvas. When the element being added is a DecisionService, you can obtain
the Shape and ShapeView instances and register the new CP handler for the shape view
instance. Once the lienzo handler do the callback call, on this new canvas control class
you can then execute the commands in order to move the shape up / down
** once the control is disabled, you can remove any listener or whatever state added to
the shape view instance.
* About (b) - Resizing the DecisionService
** Well probably there is some (maksed) bug on the resize stuff on the core as well.. :/
sorry, let's to see if we can fix/improve this :)
** The idea is that the size value is always given by the "bean". So let's
consider your DecisionService needs a width and height values - you should create both
stunner properties for width and height as usually (annotations, forms, etc) and also
specify the _PropertyMetaType.WIDTH/HEIGHT_ via annotations.
** The ShapeView implementation must implement or either _HasSize_/_HasRadiius_, or use a
custom _ShapeViewHandler_ in order to update the right attributes given some size
** Once the bean has both properties and they're available from Stunner domain
handlers (_PropertyMetaType.WIDTH/HEIGHT_):
*** When updating the value from the properties panel (or any other component), it updates
the values on the bean side, so it will update the width and height properties for the
DecisionService bean. At thsi point, once a property has been updated, it should also
refresh the shape on the canvas, so it uses the new size from the bean values.
*** When resizing from the canvas, it actually uses a canvas control - the
_ResizeControl_. The idea is the same as commented on above point (a) - register some
handlers on the lienzo size when the element/shape is being added into the canvas, and
listen for the callbacks in order to execute the right stunner commands
*** This way the idea is that both properties panel or resizing from the canvas will
update the bean values, and the (related) shape/s will be "refreshed" in order
to use the new "size" given from the (updated) bean
Well TBH not sure if I answered what you was expecting .... but at least could help a bit.
Anyway please ping me or reach me out if you think we should do some call for this, np for
me!! I'm now always starting so late hehe :).....seriously, np, just lemme know if you
need me, I'll be on PTO for a couple of weeks this xmas so let's try to have this
clear during this week, if you think so
Thanks!!
[DMN Designer] Decision Service splitter should be movable
----------------------------------------------------------
Key: DROOLS-3406
URL:
https://issues.jboss.org/browse/DROOLS-3406
Project: Drools
Issue Type: Enhancement
Components: DMN Editor
Affects Versions: 7.15.0.Final
Reporter: Michael Anstis
Assignee: Michael Anstis
Priority: Major
Labels: drools-tools
The _splitter_ within a Decision Service is static.
It needs to be movable (vertically) maintaining it's alignment with the Decision
Service bounds. At this point we need to either decide to add _result_ decision(s) and
_encapsulated_ decisions to the Decision Service by Command (depending on where the node
is dropped) or update the Marshaller to determine the type of decision based on its
vertical positioning and location of the _splitter_.
h2. Acceptance test
Decision state is updated according to _splitter_ movement. Example if area of result
decision expanded so some decision belongs there now, this decision should have state
_rusult decision_
--
This message was sent by Atlassian Jira
(v7.12.1#712002)