← Back to team overview

yellow team mailing list archive

Re: Fix initial creation of subordinates. (issue 6856067)

 

*** Submitted:

Fix initial creation of subordinates.

When creating a subordinate service initially, it was not being laid out
properly by the pack layout, nor was it seeming to have drag events
attached.  Pack layout was expecting a value accessor function to return
some number greater than zero when constructing its radius, which
informs the x/y coordinates.  Returning zero results in NaN for all
three values, thus positioning the service at (0,0) and causing drag
events to fail when updating the service's coordinates with dx/dy + NaN.
  This branch fixes this by ensuring that zero is never returned as the
node's value.  This fix is quick and intended to make the UI function
with the current layout algorithm.  Future layout algorithms, if they're
designed by hand, will need to keep this in mind as well.

R=benjamin.saller, bac
CC=
https://codereview.appspot.com/6856067


https://codereview.appspot.com/6856067/

-- 
https://code.launchpad.net/~makyo/juju-gui/adding-subordinates/+merge/135022
Your team Juju GUI Hackers is requested to review the proposed merge of lp:~makyo/juju-gui/adding-subordinates into lp:juju-gui.


References