[Freeipa-devel] [PATCH] 0004 webui: topology graph: Add pan and zoom functionality

Pavel Vomacka pvomacka at redhat.com
Mon Feb 22 16:34:14 UTC 2016



On 02/18/2016 06:21 PM, Petr Vobornik wrote:
> On 02/03/2016 03:37 PM, Pavel Vomacka wrote:
>> Hello,
>>
>> I'm sending a patch for review. This patch adds pan and zoom
>> functionality to the topology graph. The page remembers old position and
>> size of the graph. So, it keeps these settings after refreshing the 
>> page.
>>
>> The patch is in atachement.
>>
>> Pavel Vomacka
>>
>>
>
> 1. if node.fixed should be number then, we can store number in local 
> storage as well(only as string, e.g. num + '') instead of 'true' so 
> that we make the logic more straightforward/consistent.
>
Fixed.
> 2. following lines are too long: .attr("transform", "translate(" + 
> d3.event.translate + ")scale(" + d3.event.scale + ")");
>
> .attr('transform', 'translate(' + trans.translate + ')scale(' + 
> trans.scale + ')');
>
These two and one more line are now split into more lines which are 
short enough.
> 3. 'svg_' prefix for translate and scale keys is too generic, would 
> use e.g. topo_graph
>
'svg_' prefix is changed to the 'graph' prefix.

There is also change in using 'this' and 'that' variables. Instead of 
declaring 'that' variable there is used the bind() method.

-- 
Pavel^3 Vomacka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pvomacka-0004-3-Add-pan-and-zoom-functionality-to-the-topology-graph.patch
Type: text/x-patch
Size: 7241 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20160222/ae32bbb4/attachment.bin>


More information about the Freeipa-devel mailing list