[pve-devel] [PATCH manager v3] add undo Zoom Button

Dominik Csapak d.csapak at proxmox.com
Tue May 3 09:45:53 CEST 2016


>        bytesArr : [
>> @@ -108,6 +111,18 @@ Ext.define('PVE.widget.RRDChart', {
>>   	}
>>   	me.axes[0].setTitle(axisTitle);
>>   
>> +
>> +	me.addTool({
>> +	    type: 'minus',
>> +	    disabled: true,
>> +	    tooltip: gettext('Undo Zoom'),
>> +	    handler: function(){
>> +		var undoButton = me.interactions[0].getUndoButton();
>> +		if (undoButton.handler) {
>> +		    undoButton.handler();
>> +		}
>> +	    }
>> +	});
> maybe is it possible to have the 'Undo Zoom' text on the button itself ?
>
> text: gettext('Undo Zoom'),

sadly, extjs does not offer this for tools, but we could do this with 
the template functionality
i think

>
> it is a good practise to have a text label on the button itself,
> as it clarifies the meaning of the icon in this particular context,
> without forcing the user to hunt for labels
>
> ( this is discussed at length here:
> https://www.nngroup.com/articles/icon-usability/ )

i think in this use case it is not so bad, because it becomes obvious 
something happens
as soon as you zoom in

so when a user zooms in, the button becomes enabled and if you move you 
mouse over it,
the text appears an it becomes clear what it does (if it was not obvious 
already)
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>





More information about the pve-devel mailing list