Skip to content

Commit 160d22f

Browse files
authored
Merge pull request #647 from JunoLab/sp/maxplotnumber
make max number of plots configurable
2 parents 9517388 + 2c97c6a commit 160d22f

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

lib/julia-client.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ toolbar = require './package/toolbar'
88
semver = require 'semver'
99

1010
# TODO: Update me when tagging a new relase:
11-
INK_VERSION_COMPAT = "^0.11.2"
11+
INK_VERSION_COMPAT = "^0.11.6"
1212

1313
INK_LINK = '[`ink`](https://github.com/JunoLab/atom-ink)'
1414
LANGUAGE_JULIA_LINK = '[`language-julia`](https://github.com/JuliaEditorSupport/atom-language-julia)'

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)