Skip to content

Commit 87fb768

Browse files
author
Stefano Baggio
committed
End insert edit Asola AS on Personal Project
1 parent cfe5284 commit 87fb768

File tree

5 files changed

+50
-21
lines changed

5 files changed

+50
-21
lines changed

nbproject/project.properties

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
auxiliary.org-netbeans-modules-css-prep.less_2e_compiler_2e_options=
2+
auxiliary.org-netbeans-modules-css-prep.less_2e_enabled=false
3+
auxiliary.org-netbeans-modules-css-prep.less_2e_mappings=/less:/css
4+
auxiliary.org-netbeans-modules-css-prep.sass_2e_compiler_2e_options=
5+
auxiliary.org-netbeans-modules-css-prep.sass_2e_enabled=false
6+
auxiliary.org-netbeans-modules-css-prep.sass_2e_mappings=/scss:/css
7+
auxiliary.org-netbeans-modules-javascript-nodejs.enabled=false
8+
auxiliary.org-netbeans-modules-javascript-nodejs.node_2e_default=true
9+
auxiliary.org-netbeans-modules-javascript-nodejs.run_2e_enabled=false
10+
auxiliary.org-netbeans-modules-javascript-nodejs.sync_2e_enabled=true
11+
auxiliary.org-netbeans-modules-javascript2-requirejs.enabled=true
12+
auxiliary.org-netbeans-modules-web-clientproject-api.js_2e_libs_2e_folder=js/libs
13+
browser.autorefresh.Chromium.INTEGRATED=true
14+
browser.highlightselection.Chromium.INTEGRATED=true
15+
browser.run=true
16+
files.encoding=UTF-8
17+
site.root.folder=
18+
source.folder=
19+
start.file=index.html
20+
web.context.root=/plotly

nbproject/project.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://www.netbeans.org/ns/project/1">
3+
<type>org.netbeans.modules.web.clientproject</type>
4+
<configuration>
5+
<data xmlns="http://www.netbeans.org/ns/clientside-project/1">
6+
<name>plotly.js</name>
7+
</data>
8+
<libraries xmlns="http://www.netbeans.org/ns/cdnjs-libraries/1"/>
9+
</configuration>
10+
</project>

src/components/modebar/buttons.js

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,24 +46,23 @@ var modeBarButtons = module.exports = {};
4646

4747
modeBarButtons.toImage = {
4848
name: 'toImage',
49-
title: 'Download plot as a png',
49+
title: _lang.print_png,
5050
icon: Icons.camera,
5151
click: function(gd) {
5252
var format = 'png';
5353

5454
if(Lib.isIE()) {
55-
Lib.notifier('Snapshotting is unavailable in Internet Explorer. ' +
56-
'Consider exporting your images using the Plotly Cloud', 'long');
55+
Lib.notifier(_lang.png_impossible, 'long');
5756
return;
5857
}
5958

6059
if(gd._snapshotInProgress) {
61-
Lib.notifier('Snapshotting is still in progress - please hold', 'long');
60+
Lib.notifier(_lang.snapshot_inProgress, 'long');
6261
return;
6362
}
6463

6564
gd._snapshotInProgress = true;
66-
Lib.notifier('Taking snapshot - this may take a few seconds', 'long');
65+
Lib.notifier(_lang.taking_snapshot, 'long');
6766

6867
var ev = Snapshot.toImage(gd, {format: format});
6968

@@ -87,7 +86,7 @@ modeBarButtons.toImage = {
8786
ev.once('error', function(err) {
8887
gd._snapshotInProgress = false;
8988

90-
Lib.notifier('Sorry there was a problem downloading your ' + format, 'long');
89+
Lib.notifier(_lang.snapshot_error, 'long');
9190
console.error(err);
9291

9392
ev.clean();
@@ -97,16 +96,16 @@ modeBarButtons.toImage = {
9796

9897
modeBarButtons.sendDataToCloud = {
9998
name: 'sendDataToCloud',
100-
title: 'Save and edit plot in cloud',
99+
title: 'Save and edit',
101100
icon: Icons.disk,
102101
click: function(gd) {
103-
Plotly.Plots.sendDataToCloud(gd);
102+
//Plotly.Plots.sendDataToCloud(gd);
104103
}
105104
};
106105

107106
modeBarButtons.zoom2d = {
108107
name: 'zoom2d',
109-
title: 'Zoom',
108+
title: _lang.zoom,
110109
attr: 'dragmode',
111110
val: 'zoom',
112111
icon: Icons.zoombox,
@@ -115,7 +114,7 @@ modeBarButtons.zoom2d = {
115114

116115
modeBarButtons.pan2d = {
117116
name: 'pan2d',
118-
title: 'Pan',
117+
title: _lang.pan,
119118
attr: 'dragmode',
120119
val: 'pan',
121120
icon: Icons.pan,
@@ -124,7 +123,7 @@ modeBarButtons.pan2d = {
124123

125124
modeBarButtons.select2d = {
126125
name: 'select2d',
127-
title: 'Box Select',
126+
title: _lang.box_selected,
128127
attr: 'dragmode',
129128
val: 'select',
130129
icon: Icons.selectbox,
@@ -133,7 +132,7 @@ modeBarButtons.select2d = {
133132

134133
modeBarButtons.lasso2d = {
135134
name: 'lasso2d',
136-
title: 'Lasso Select',
135+
title: _lang.lasso_select,
137136
attr: 'dragmode',
138137
val: 'lasso',
139138
icon: Icons.lasso,
@@ -142,7 +141,7 @@ modeBarButtons.lasso2d = {
142141

143142
modeBarButtons.zoomIn2d = {
144143
name: 'zoomIn2d',
145-
title: 'Zoom in',
144+
title: _lang.zoom_in,
146145
attr: 'zoom',
147146
val: 'in',
148147
icon: Icons.zoom_plus,
@@ -151,7 +150,7 @@ modeBarButtons.zoomIn2d = {
151150

152151
modeBarButtons.zoomOut2d = {
153152
name: 'zoomOut2d',
154-
title: 'Zoom out',
153+
title: _lang.zoom_out,
155154
attr: 'zoom',
156155
val: 'out',
157156
icon: Icons.zoom_minus,
@@ -160,7 +159,7 @@ modeBarButtons.zoomOut2d = {
160159

161160
modeBarButtons.autoScale2d = {
162161
name: 'autoScale2d',
163-
title: 'Autoscale',
162+
title: _lang.autoscale,
164163
attr: 'zoom',
165164
val: 'auto',
166165
icon: Icons.autoscale,
@@ -169,7 +168,7 @@ modeBarButtons.autoScale2d = {
169168

170169
modeBarButtons.resetScale2d = {
171170
name: 'resetScale2d',
172-
title: 'Reset axes',
171+
title: _lang.reset_axes,
173172
attr: 'zoom',
174173
val: 'reset',
175174
icon: Icons.home,
@@ -178,7 +177,7 @@ modeBarButtons.resetScale2d = {
178177

179178
modeBarButtons.hoverClosestCartesian = {
180179
name: 'hoverClosestCartesian',
181-
title: 'Show closest data on hover',
180+
title: _lang.show_closest_data_on_hover,
182181
attr: 'hovermode',
183182
val: 'closest',
184183
icon: Icons.tooltip_basic,
@@ -188,7 +187,7 @@ modeBarButtons.hoverClosestCartesian = {
188187

189188
modeBarButtons.hoverCompareCartesian = {
190189
name: 'hoverCompareCartesian',
191-
title: 'Compare data on hover',
190+
title: _lang.compare_data_on_hover,
192191
attr: 'hovermode',
193192
val: function(gd) {
194193
return gd._fullLayout._isHoriz ? 'y' : 'x';

src/plots/cartesian/axes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1710,13 +1710,13 @@ axes.doTicks = function(gd, axid, skipTitle) {
17101710
{_offset: gs.l + (ax.position || 0) * gs.w, _length: 0} :
17111711
axisIds.getFromId(gd, ax.anchor);
17121712

1713-
y = ax._offset + ax._length / 2;
1713+
y = ax._offset + ax._length / 2 + 10; //added +10 for shift the label downside
17141714
x = counterAxis._offset + ((ax.side === 'right') ?
17151715
counterAxis._length + 10 +
17161716
fontSize * (offsetBase + (ax.showticklabels ? 1 : 0.5)) :
17171717
-10 - fontSize * (offsetBase + (ax.showticklabels ? 0.5 : 0)));
17181718

1719-
transform = {rotate: '-90', offset: 0};
1719+
transform = {rotate: '0', offset: 0}; //rotate changed from -90 to 0
17201720
if(!avoid.side) avoid.side = 'left';
17211721
}
17221722

src/plots/cartesian/dragbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ module.exports = function dragBox(gd, plotinfo, x, y, w, h, ns, ew) {
355355
// deactivate mousewheel scrolling on embedded graphs
356356
// devs can override this with layout._enablescrollzoom,
357357
// but _ ensures this setting won't leave their page
358-
if(!gd._context.scrollZoom && !fullLayout._enablescrollzoom) {
358+
if(!gd._context.scrollZoom && !fullLayout._enablescrollzoom && !e.ctrlKey) { //added && !e.ctrlKey zoom only on cntrl+wheel
359359
return;
360360
}
361361
var pc = gd.querySelector('.plotly');

0 commit comments

Comments
 (0)