Skip to content

Commit af25ead

Browse files
committed
make max number of plots configurable
1 parent 9517388 commit af25ead

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

lib/package/config.coffee

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,12 @@ config =
410410
type: 'boolean'
411411
default: true
412412
order: 11
413+
maxNumberPlots:
414+
title: 'Maximum Number of Plots in History'
415+
type: 'number'
416+
description: 'Increasing this number may lead to high memory consumption and poor performance.'
417+
default: 50
418+
order: 12
413419
consoleOptions:
414420
type: 'object'
415421
title: 'Terminal Options'

lib/runtime/plots.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ export default {
6060
show (view) {
6161
this.ensureVisible()
6262
const v = views.render(view)
63-
this.pane.show(new this.ink.Pannable(v))
63+
this.pane.show(new this.ink.Pannable(v), {
64+
maxSize: atom.config.get('julia-client.uiOptions.maxNumberPlots')
65+
})
6466
return v
6567
},
6668

@@ -88,7 +90,9 @@ export default {
8890
ploturl (url) {
8991
const v = this.webview(url)
9092
this.ensureVisible()
91-
return this.pane.show(v)
93+
return this.pane.show(v, {
94+
maxSize: atom.config.get('julia-client.uiOptions.maxNumberPlots')
95+
})
9296
},
9397

9498
jlpane (id, opts) {

0 commit comments

Comments
 (0)