Commit f34c9c5aea22f30f13e7ee7c44e82bf15cb4f02b

Authored by Benjamin Renard
1 parent a075b52e

Finalize color picker

js/app/models/PlotObjects/PlotBaseSerieObject.js
... ... @@ -25,12 +25,9 @@ Ext.define('amdaPlotObj.PlotBaseSerieObject', {
25 25 {name: 'serie-resolution', type: 'int'},
26 26 {name: 'serie-lines-activated', type: 'boolean'},
27 27 {name: 'serie-lines-color-activated', type: 'boolean'},
28   - {name: 'serie-lines-color-auto', type: 'boolean'},
29 28 {name: 'serie-lines-style', type: 'string'},
30 29 {name: 'serie-lines-width', type: 'float'},
31 30 {name: 'serie-lines-color', type: 'string'},
32   - {name: 'serie-lines-color-rgb', type: 'array'},
33   - {name: 'serie-symbols-activated', type: 'boolean'},
34 31 {name: 'serie-symbols-type', type: 'string'},
35 32 {name: 'serie-symbols-size', type: 'float'},
36 33 {name: 'serie-symbols-color', type: 'string'},
... ... @@ -87,17 +84,6 @@ Ext.define('amdaPlotObj.PlotBaseSerieObject', {
87 84 }
88 85 this.dirty = false;
89 86 },
90   - getDefaultColor:function(name){
91   - var defaultClors = new Object();
92   - defaultClors['serie-lines-color'] = amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.color;
93   - defaultClors['serie-symbols-color'] = amdaPlotObj.PlotObjectConfig.defaultValues.serie.symbols.color;
94   - defaultClors['serie-timetick-color'] = amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.color;
95   - defaultClors['serie-timetick-symbols-color'] = amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.color;
96   - defaultClors['serie-timetick-firstsymbols-color'] = amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.firstsymbols.color;
97   - defaultClors['serie-intervaltick-color'] = amdaPlotObj.PlotObjectConfig.defaultValues.serie.intervaltick.color;
98   - defaultClors['serie-intervaltick-symbols-color'] = amdaPlotObj.PlotObjectConfig.defaultValues.serie.intervaltick.symbols.color;
99   - return defaultClors[name];
100   - },
101 87  
102 88 setDefaultValues: function ()
103 89 {
... ... @@ -108,8 +94,6 @@ Ext.define('amdaPlotObj.PlotBaseSerieObject', {
108 94 this.set('serie-lines-style', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.style);
109 95 this.set('serie-lines-width', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.width);
110 96 this.set('serie-lines-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.color);
111   - this.set('serie-lines-color-activated', false);
112   - this.set('serie-lines-color-auto', true);
113 97  
114 98 this.set('serie-symbols-activated', false);
115 99 this.set('serie-symbols-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.symbols.type);
... ... @@ -123,7 +107,6 @@ Ext.define('amdaPlotObj.PlotBaseSerieObject', {
123 107 this.set('serie-timetick-nbmajor', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.nbmajor);
124 108 this.set('serie-timetick-nbminor', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.nbminor);
125 109 this.set('serie-timetick-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.color);
126   - this.set('serie-errorbar-lines-color-rgb', amdaPlotObj.PlotObjectConfig.defaultValues.serie.lines.rgb);
127 110 this.set('serie-timetick-symbols-type', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.type);
128 111 this.set('serie-timetick-symbols-size', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.size);
129 112 this.set('serie-timetick-symbols-color', amdaPlotObj.PlotObjectConfig.defaultValues.serie.timetick.symbols.color);
... ... @@ -174,9 +157,6 @@ Ext.define('amdaPlotObj.PlotBaseSerieObject', {
174 157 serieValues['serie-lines-style'] = this.get('serie-lines-style');
175 158 serieValues['serie-lines-width'] = this.get('serie-lines-width');
176 159 serieValues['serie-lines-color'] = this.get('serie-lines-color');
177   - serieValues['serie-lines-color-activated'] = this.get('serie-lines-color-activated');
178   - serieValues['serie-lines-color-auto'] = this.get('serie-lines-color-auto');
179   - serieValues['serie-errorbar-lines-rgb'] = this.get('serie-errorbar-lines-rgb');
180 160  
181 161 serieValues['serie-symbols-activated'] = this.get('serie-symbols-activated');
182 162 serieValues['serie-symbols-type'] = this.get('serie-symbols-type');
... ...
js/app/models/PlotObjects/PlotObjectConfig.js
... ... @@ -138,8 +138,6 @@ Ext.define('amdaPlotObj.PlotObjectConfig', {
138 138 }
139 139 },
140 140 projection: 'XY',
141   - 'rgb' : [0,0,0]
142   -
143 141 },
144 142 spectro: {
145 143 yAxis: 'y-left',
... ...
js/app/views/PlotComponents/PlotBaseAxisForm.js
... ... @@ -28,7 +28,7 @@ Ext.define('amdaPlotComp.PlotBaseAxisForm', {
28 28  
29 29 var legendItems = [
30 30 this.addStandardText('axis-legend-text', 'Text'),
31   - this.addStandardColor('axis-legend-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
  31 + this.addColorsPicker('axis-legend-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'auto'),
32 32 this.addStandardFont('axis-legend-font')
33 33 ];
34 34 var manageTicksNumber = function (name, newValue, oldValue){
... ... @@ -64,8 +64,9 @@ Ext.define('amdaPlotComp.PlotBaseAxisForm', {
64 64 var axisItems = [];
65 65 if (this.showScaleOption)
66 66 axisItems.push(this.addStandardCombo('axis-scale', 'Scale', amdaPlotObj.PlotObjectConfig.availableAxisScales));
67   - if (this.showColorOption)
68   - axisItems.push(this.addStandardColor('axis-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors));
  67 + if (this.showColorOption) {
  68 + axisItems.push(this.addColorsPicker('axis-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'auto'));
  69 + }
69 70 axisItems.push(this.addStandardFloat('axis-thickness', 'Thickness', 1, 10));
70 71 axisItems.push(this.addStandardCheck('axis-reverse', 'Reverse direction'));
71 72 if (this.showRangeOptions)
... ...
js/app/views/PlotComponents/PlotBaseSerieForm.js
... ... @@ -57,7 +57,7 @@ Ext.define('amdaPlotComp.PlotBaseSerieForm', {
57 57 this.addStandardFloat('serie-timetick-step', 'Time step (sec.)'),
58 58 this.addStandardFloat('serie-timetick-nbmajor', 'Number of major ticks'),
59 59 this.addStandardFloat('serie-timetick-nbminor', 'Number of minor ticks'),
60   - this.addStandardColor('serie-timetick-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
  60 + this.addColorsPicker('serie-timetick-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew),
61 61 this.addStandardFieldSet('Symbols', '', this.addStandardSymbolsItems('serie-timetick-symbols')),
62 62 this.addStandardFieldSet('First symbol', 'serie-timetick-firstsymbols-activated', this.addStandardSymbolsItems('serie-timetick-firstsymbols')),
63 63 this.addStandardFont('serie-timetick-font')
... ... @@ -69,7 +69,7 @@ Ext.define('amdaPlotComp.PlotBaseSerieForm', {
69 69  
70 70 return [
71 71 this.addStandardCombo('serie-intervaltick-mode', 'Mode', amdaPlotObj.PlotObjectConfig.availableIntervalTickModes),
72   - this.addStandardColor('serie-intervaltick-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
  72 + this.addColorsPicker('serie-intervaltick-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew),
73 73 this.addStandardFieldSet('Symbols', '', this.addStandardSymbolsItems('serie-intervaltick-symbols')),
74 74 this.addStandardFont('serie-intervaltick-font')
75 75 ];
... ...
js/app/views/PlotComponents/PlotColorAxisForm.js
... ... @@ -17,10 +17,10 @@ Ext.define('amdaPlotComp.PlotColorAxisForm', {
17 17 getFormItems: function() {
18 18 var timeItems = [
19 19 this.addStandardCombo('axis-color-map', 'Color Map', amdaPlotObj.PlotObjectConfig.availableColorMaps),
20   - this.addStandardColor('axis-color-minval', 'Min. Val. Color', amdaPlotObj.PlotObjectConfig.availableColors),
21   - this.addStandardColor('axis-color-maxval', 'Max. Val. Color', amdaPlotObj.PlotObjectConfig.availableColors)
  20 + this.addColorsPicker('axis-color-minval', 'Min. Val. Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none'),
  21 + this.addColorsPicker('axis-color-maxval', 'Max. Val. Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none')
22 22 ];
23 23  
24 24 return Ext.Array.merge(timeItems, this.callParent());
25 25 }
26   -});
27 26 \ No newline at end of file
  27 +});
... ...
js/app/views/PlotComponents/PlotColorPicker.js
... ... @@ -18,11 +18,6 @@ Ext.define('amdaPlotComp.PlotColorPicker', {
18 18 this.callParent(arguments);
19 19 },
20 20  
21   - /*setHexColor: function(hexColor) {
22   - this.colorDisplayer.setValue(hexColor);
23   - this.rgbColorPicker.setRgbColor(this.hexToRgb(hexColor));
24   - },*/
25   -
26 21 rgbToHex : function(rgb) {
27 22 return "#" + ((1 << 24) + (rgb[0] << 16) + (rgb[1] << 8) + rgb[2] ).toString(16).slice(1).toUpperCase();
28 23 },
... ... @@ -36,27 +31,6 @@ Ext.define(&#39;amdaPlotComp.PlotColorPicker&#39;, {
36 31 return arrByte.slice(1,4);
37 32 },
38 33  
39   - // Override createCheckboxCmp method
40   - createCheckboxCmp: function() {
41   - console.log('createCheckboxCmp');
42   - var me = this,
43   - suffix = '-checkbox';
44   -
45   - me.checkboxCmp = Ext.widget({
46   - xtype: 'checkbox',
47   - hideEmptyLabel: true,
48   - name: me.checkboxName || me.id + suffix,
49   - cls: me.baseCls + '-header' + suffix,
50   - id: me.id + '-legendChk',
51   - checked: !me.collapsed,
52   - listeners: {
53   - change: me.onCheckChange,
54   - scope: me
55   - }
56   - });
57   - return me.checkboxCmp;
58   - },
59   -
60 34 init : function(config) {
61 35 var me = this;
62 36  
... ... @@ -100,27 +74,14 @@ Ext.define(&#39;amdaPlotComp.PlotColorPicker&#39;, {
100 74 },
101 75 listeners: {
102 76 change: function (field, newValue, oldValue, eOpts) {
103   - /*if (config.onChange) {
104   - config.onChange(config.name, newValue, oldValue);
105   - }*/
106   -
107   - if ((newValue == 'auto') && this.checkboxCmp.getValue()) {
  77 + if (this.checkboxCmp && (newValue == this.mode) && this.checkboxCmp.getValue()) {
108 78 this.collapse();
109 79 return;
110 80 }
111   - else if ((newValue != 'auto') && !this.checkboxCmp.getValue()) {
  81 + else if (this.checkboxCmp && (newValue != this.mode) && !this.checkboxCmp.getValue()) {
112 82 this.expand();
113 83 return;
114 84 }
115   - /*console.log('displayer change - ' + this.colorDisplayer.inExpandCollapseEvent);
116   - console.log(newValue + ' - ' + oldValue);
117   - if (!this.colorDisplayer.inExpandCollapseEvent) {
118   - if (newValue == 'auto')
119   - this.collapse();
120   - else
121   - this.expand();
122   - }*/
123   - console.log('============> ' + newValue);
124 85 field.getEl().applyStyles({'background':newValue});
125 86 this.rgbColorPicker.setRgbColor(this.hexToRgb(newValue));
126 87 if (config.onChange) {
... ... @@ -195,12 +156,17 @@ Ext.define(&#39;amdaPlotComp.PlotColorPicker&#39;, {
195 156 ]
196 157 });
197 158  
  159 + if (!config.mode) {
  160 + config.mode = 'standard';
  161 + }
  162 +
198 163 var myConf = {
199 164 cls: 'child-fieldset',
200 165 title: config.label ? config.label : 'Color',
201   - collapsible: true,
  166 + collapsible: config.mode != 'standard',
202 167 collapsed: false,
203   - checkboxToggle: true,
  168 + checkboxToggle: config.mode != 'standard',
  169 + mode: config.mode,
204 170 layout: {
205 171 type: 'vbox',
206 172 pack: 'start',
... ... @@ -221,15 +187,12 @@ Ext.define(&#39;amdaPlotComp.PlotColorPicker&#39;, {
221 187 this.rgbColorPicker
222 188 ],
223 189 listeners: {
224   - expand: function (fieldset, eOpts) {
225   - console.log(eOpts);
226   - if (config.onChange) {
227   - config.onChange(config.name, '#000000', 'auto');
228   - }
  190 + beforeexpand: function (fieldset, eOpts) {
  191 + me.colorDisplayer.setValue('#000000');
229 192 },
230 193 collapse: function (fieldset, eOpts) {
231 194 if (config.onChange) {
232   - config.onChange(config.name, 'auto', this.colorDisplayer.getValue());
  195 + config.onChange(config.name, this.mode, this.colorDisplayer.getValue());
233 196 }
234 197 },
235 198 scope: this
... ...
js/app/views/PlotComponents/PlotFillForm.js
... ... @@ -88,8 +88,8 @@ Ext.define(&#39;amdaPlotComp.PlotFillForm&#39;, {
88 88 this.addStandardCombo('fill-firstserie-id', 'First serie Id', []),
89 89 this.addStandardCombo('fill-secondserie-id', 'Second serie Id', []),
90 90 this.addStandardCombo('fill-constant-id', 'Constant Id', []),
91   - this.addStandardColor('fill-greater-color', 'Greater Color', amdaPlotObj.PlotObjectConfig.availableBackgroundColors),
92   - this.addStandardColor('fill-less-color', 'Less Color', amdaPlotObj.PlotObjectConfig.availableBackgroundColors)
  91 + this.addColorsPicker('fill-greater-color', 'Greater Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none'),
  92 + this.addColorsPicker('fill-less-color', 'Less Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none')
93 93 ];
94 94 }
95   -});
96 95 \ No newline at end of file
  96 +});
... ...
js/app/views/PlotComponents/PlotLegendSeriesForm.js
... ... @@ -22,7 +22,7 @@ Ext.define(&#39;amdaPlotComp.PlotLegendSeriesForm&#39;, {
22 22  
23 23 getFormItems: function() {
24 24 var borderItems = [
25   - this.addStandardColor('legend-series-border-color', 'Border Color', amdaPlotObj.PlotObjectConfig.availableColors),
  25 + this.addColorsPicker('legend-series-border-color', 'Border Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none')
26 26 ];
27 27  
28 28 var intervalInfoItems = [
... ... @@ -32,7 +32,7 @@ Ext.define(&#39;amdaPlotComp.PlotLegendSeriesForm&#39;, {
32 32 var legendItems = [
33 33 this.addStandardCombo('legend-series-type', 'Type', amdaPlotObj.PlotObjectConfig.availableLegendSeriesTypes),
34 34 this.addStandardCombo('legend-series-position', 'Position', amdaPlotObj.PlotObjectConfig.availableLegendSeriesPositions),
35   - this.addStandardColor('legend-series-defaulttextcolor', 'Default Text Color', amdaPlotObj.PlotObjectConfig.availableColors),
  35 + this.addColorsPicker('legend-series-defaulttextcolor', 'Default Text Color', amdaPlotObj.PlotObjectConfig.availableColorsNew),
36 36 this.addStandardCheck('legend-series-showparaminfo', 'Show Param Info'),
37 37 this.addStandardFieldSet('Show Interval Info', 'legend-series-intervalinfo-activated', intervalInfoItems),
38 38 this.addStandardFieldSet('Border', 'legend-series-border-activated', borderItems),
... ... @@ -48,4 +48,4 @@ Ext.define(&#39;amdaPlotComp.PlotLegendSeriesForm&#39;, {
48 48 })
49 49 ];
50 50 }
51   -});
52 51 \ No newline at end of file
  52 +});
... ...
js/app/views/PlotComponents/PlotLegendTextForm.js
... ... @@ -22,7 +22,7 @@ Ext.define(&#39;amdaPlotComp.PlotLegendTextForm&#39;, {
22 22  
23 23 return [
24 24 this.addStandardText('legend-text-value', 'Text'),
25   - this.addStandardColor('legend-text-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
  25 + this.addColorsPicker('legend-text-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew),
26 26 this.addStandardCombo('legend-text-position', 'Position', amdaPlotObj.PlotObjectConfig.availableLegendTextPositions, function(name, value, oldValue) {
27 27 me.object.set('legend-text-position', value);
28 28 me.crtTree.refresh();
... ... @@ -30,4 +30,4 @@ Ext.define(&#39;amdaPlotComp.PlotLegendTextForm&#39;, {
30 30 this.addStandardFont('legend-text-font')
31 31 ];
32 32 }
33   -});
34 33 \ No newline at end of file
  34 +});
... ...
js/app/views/PlotComponents/PlotPageForm.js
... ... @@ -14,7 +14,7 @@ Ext.define(&#39;amdaPlotComp.PlotPageForm&#39;, {
14 14 getFormItems: function() {
15 15 var titleItems = [
16 16 this.addStandardText('page-title-text', 'Text'),
17   - this.addStandardColor('page-title-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
  17 + this.addColorsPicker('page-title-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew),
18 18 this.addStandardCombo('page-title-position', 'Position', amdaPlotObj.PlotObjectConfig.availableTitlePositions),
19 19 this.addStandardCombo('page-title-alignment', 'Alignment', amdaPlotObj.PlotObjectConfig.availableTitleAlignments),
20 20 this.addStandardFont('page-title-font')
... ... @@ -45,4 +45,4 @@ Ext.define(&#39;amdaPlotComp.PlotPageForm&#39;, {
45 45 this.addStandardFont('page-font')
46 46 ];
47 47 }
48   -});
49 48 \ No newline at end of file
  49 +});
... ...
js/app/views/PlotComponents/PlotPanelForm.js
... ... @@ -96,7 +96,7 @@ Ext.define(&#39;amdaPlotComp.PlotPanelForm&#39;, {
96 96  
97 97 var titleItems = [
98 98 this.addStandardText('panel-title-text', 'Text'),
99   - this.addStandardColor('panel-title-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
  99 + this.addColorsPicker('panel-title-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew),
100 100 this.addStandardCombo('panel-title-position', 'Position', amdaPlotObj.PlotObjectConfig.availableTitlePositions),
101 101 this.addStandardCombo('panel-title-alignment', 'Alignment', amdaPlotObj.PlotObjectConfig.availableTitleAlignments),
102 102 this.addStandardFont('panel-title-font')
... ... @@ -141,7 +141,7 @@ Ext.define(&#39;amdaPlotComp.PlotPanelForm&#39;, {
141 141 me.object.set('panel-instant-time', value);
142 142 me.crtTree.refresh();
143 143 }),
144   - this.addStandardColor('panel-background-color', 'Background Color', amdaPlotObj.PlotObjectConfig.availableBackgroundColors),
  144 + this.addColorsPicker('panel-background-color', 'Background Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'none'),
145 145 this.addStandardFieldSet('Manual Bounds', '', boundsItems),
146 146 this.addStandardFieldSet('Manual Margins', '', marginItems),
147 147 this.addStandardFieldSet('Preferred Dimensions', '', preferedDimItems),
... ...
js/app/views/PlotComponents/PlotParamForm.js
... ... @@ -123,7 +123,6 @@ Ext.define(&#39;amdaPlotComp.PlotParamForm&#39;, {
123 123 onChangeParamArgs: function (uiScope, args_key, newValue, oldValue, isTemplateArg) {
124 124 if ((uiScope.isFirstMsg) && (uiScope.object.get('type') == 2) && (uiScope.object.get('dim1-sum-type') == 0) && (uiScope.object.get('dim2-sum-type') == 0) &&
125 125 (uiScope.object.get('dim1-index') == '*') && (uiScope.object.get('dim2-index') == '*') && (uiScope.object.get('param-drawing-type') != 'sauvaud')) {
126   - console.log(uiScope.object);
127 126 uiScope.isFirstMsg = false;
128 127 myDesktopApp.warningMsg('If argument <i>All</i> is set for both dimensions output will be the total sum <b>(not spectra!)</b>');
129 128 }
... ...
js/app/views/PlotComponents/PlotSerieForm.js
... ... @@ -82,17 +82,6 @@ Ext.define(&#39;amdaPlotComp.PlotSerieForm&#39;, {
82 82 });
83 83  
84 84 serieItems.push(this.addStandardFieldSet('Error Bar', 'serie-errorbar-activated', this.getErrorBarItems()));
85   - /**
86   - var colorPicker = Ext.create('Ext.menu.ColorPicker', {
87   - value: '000000'
88   - });
89   - var colorMenu =Ext.create('Ext.menu.Menu', {
90   - items: [{
91   - text: 'Choose a color',
92   - menu: colorPicker
93   - }]
94   - }).show();
95   - serieItems.push(colorMenu); */
96 85 return serieItems;
97 86 }
98 87 });
... ...
js/app/views/PlotComponents/PlotStandardForm.js
... ... @@ -14,7 +14,7 @@ Ext.define(&#39;amdaPlotComp.PlotStandardForm&#39;, {
14 14 requires: [
15 15 'amdaPlotObj.PlotObjectConfig',
16 16 'amdaPlotComp.EraseTrigger',
17   - 'amdaPlotComp.PlotColorPicker'
  17 + 'amdaPlotComp.PlotColorPicker'
18 18 ],
19 19  
20 20 //Object associated to this form
... ... @@ -194,13 +194,13 @@ Ext.define(&#39;amdaPlotComp.PlotStandardForm&#39;, {
194 194 };
195 195 },
196 196  
197   - addStandardFieldSet: function (title, checkboxName, items, onChangeCheck, collapsed_ = true) {
  197 + addStandardFieldSet: function (title, checkboxName, items, onChangeCheck) {
198 198 return {
199 199 xtype: 'fieldset',
200 200 cls: 'child-fieldset',
201 201 title: title,
202 202 collapsible: true,
203   - collapsed: collapsed_,
  203 + collapsed: true,
204 204 checkboxName: checkboxName,
205 205 checkboxToggle: checkboxName != '',
206 206 layout: {
... ... @@ -406,8 +406,7 @@ Ext.define(&#39;amdaPlotComp.PlotStandardForm&#39;, {
406 406 return [
407 407 this.addStandardCombo(namePrefix + '-style', 'Style', amdaPlotObj.PlotObjectConfig.availableLinesStyles),
408 408 this.addStandardFloat(namePrefix + '-width', 'Width', 1, 10),
409   - //this.addStandardColor(namePrefix + '-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
410   - this.addColorsPicker(namePrefix + '-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew)
  409 + this.addColorsPicker(namePrefix + '-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'auto')
411 410 ];
412 411 },
413 412  
... ... @@ -415,17 +414,17 @@ Ext.define(&#39;amdaPlotComp.PlotStandardForm&#39;, {
415 414 return [
416 415 this.addStandardCombo(namePrefix + '-type', 'Type', amdaPlotObj.PlotObjectConfig.availableSymbolsTypes),
417 416 this.addStandardFloat(namePrefix + '-size', 'Size', 1, 10),
418   - this.addStandardColor(namePrefix + '-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors)
  417 + this.addColorsPicker(namePrefix + '-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew, 'auto')
419 418 ];
420 419 },
421 420  
422   - addColorsPicker: function (name, label, availableColors, onChange) {
  421 + addColorsPicker: function (name, label, availableColors, mode) {
  422 + if (!mode) {
  423 + mode = 'standard';
  424 + }
423 425 var me =this;
424   - return new amdaPlotComp.PlotColorPicker({name: name, label: label, colors: availableColors, onChange: function(name, newValue, oldValue) {
  426 + return new amdaPlotComp.PlotColorPicker({name: name, label: label, mode: mode, colors: availableColors, onChange: function(name, newValue, oldValue) {
425 427 me.object.set(name, newValue);
426   - console.log(newValue);
427   - if (onChange != null)
428   - onChange(name, newValue, oldValue);
429 428 }});
430 429 },
431 430  
... ...
js/app/views/PlotComponents/PlotTextForm.js
... ... @@ -62,7 +62,7 @@ Ext.define(&#39;amdaPlotComp.PlotTextForm&#39;, {
62 62 var me = this;
63 63 return [
64 64 this.addStandardText('text-value', 'Text'),
65   - this.addStandardColor('text-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColors),
  65 + this.addColorsPicker('text-color', 'Color', amdaPlotObj.PlotObjectConfig.availableColorsNew),
66 66 this.addStandardCombo('text-align', 'Alignment', amdaPlotObj.PlotObjectConfig.availableTextAlignments),
67 67 this.addStandardCheck('text-x-relative', 'Relative X Position', function(name, value, oldValue) {
68 68 me.updateOptions(me.crtTree.getSelectedPlotType());
... ... @@ -78,4 +78,4 @@ Ext.define(&#39;amdaPlotComp.PlotTextForm&#39;, {
78 78 this.addStandardFont('text-font')
79 79 ];
80 80 }
81   -});
82 81 \ No newline at end of file
  82 +});
... ...