Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
leverjs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
leverjs
Commits
bf78d909
Commit
bf78d909
authored
2 years ago
by
ac
Browse files
Options
Downloads
Patches
Plain Diff
leversc nvm integration linux
parent
6eaaa77c
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
elever/main.js
+3
-2
3 additions, 2 deletions
elever/main.js
leverjs/ImageWindowBuilder.js
+3
-2
3 additions, 2 deletions
leverjs/ImageWindowBuilder.js
leversc/src/MATLAB/@leversc/show.m
+14
-4
14 additions, 4 deletions
leversc/src/MATLAB/@leversc/show.m
with
20 additions
and
8 deletions
elever/main.js
+
3
−
2
View file @
bf78d909
...
...
@@ -5,7 +5,6 @@ const app = electron.app
// Module to create native browser window.
const
BrowserWindow
=
electron
.
BrowserWindow
const
path
=
require
(
'
path
'
)
const
url
=
require
(
'
url
'
)
const
{
ipcMain
}
=
require
(
'
electron
'
);
...
...
@@ -24,7 +23,9 @@ function createWindow ()
// Create the browser window.
mainWindow
=
new
BrowserWindow
({
width
:
800
,
height
:
600
,
icon
:
path
.
join
(
__dirname
,
'
..
'
,
'
leverjs/leverjs.ico
'
),
webPreferences
:
{
nodeIntegration
:
true
nodeIntegration
:
true
,
contextIsolation
:
false
,
enableRemoteModule
:
true
}
});
...
...
This diff is collapsed.
Click to expand it.
leverjs/ImageWindowBuilder.js
+
3
−
2
View file @
bf78d909
...
...
@@ -41,7 +41,8 @@ var miniMapmousedrag = false;
// database is read only
var
gbReadOnlyDB
=
false
;
const
IS_NODE
=
typeof
module
!==
'
undefined
'
&&
module
.
exports
;
// const IS_NODE = typeof module !== 'undefined' && module.exports;
var
IS_NODE
=
navigator
.
userAgent
.
indexOf
(
'
Electron
'
)
>=
0
// set to tell render.js (reDraw) not to kick off a multires if we're in the experiment window
var
gbExperimentRender
=
false
;
...
...
@@ -171,7 +172,7 @@ window.onload = function () {
ROOT
=
params
[
1
].
slice
(
'
ROOT=
'
.
length
)
title
=
params
[
2
].
slice
(
'
TITLE=
'
.
length
)
console
.
log
(
'
lever figure window found :: port=
'
+
port
+
"
:: root=
"
+
root
)
console
.
log
(
'
lever figure window found :: port=
'
+
port
+
"
:: root=
"
+
ROOT
)
uiServer
.
init
(
port
,
window
)
document
.
title
=
'
leversc
'
+
title
setLeverscUI
()
...
...
This diff is collapsed.
Click to expand it.
leversc/src/MATLAB/@leversc/show.m
+
14
−
4
View file @
bf78d909
...
...
@@ -106,8 +106,18 @@ end
function
launch_electron_posix
(
port
,
fignum
,
workdir
,
leverpath
,
strDB
)
elec_cmd
=
'leverjs'
;
px
=
getenv
(
'PATH'
);
if
(
~
isempty
(
leverpath
)
)
% first try NVM
nvm_path
=
getenv
(
'NVM_DIR'
);
if
~
isempty
(
nvm_path
)
[
ret
,
elec_path
]
=
system
(
'source ~/.nvm/nvm.sh;which electron'
);
elec_path
=
replace
(
elec_path
,
newline
,
''
);
nodePath
=
fileparts
(
elec_path
);
px
=
[
px
':'
nodePath
];
else
elec_path
=
fullfile
(
leverpath
,
'node_modules'
,
'.bin'
,
'electron'
);
end
elec_cmd
=
[
elec_path
' '
fullfile
(
leverpath
,
'elever'
,
'main.js'
)];
else
[
status
,
~
]
=
system
([
'which '
elec_cmd
]);
...
...
@@ -118,8 +128,8 @@ end
if
exist
(
'strDB'
,
'var'
)
&&
~
isempty
(
strDB
)
elec_cmd
=
[
elec_cmd
' --leverFile='
strDB
' '
];
end
cmd
=
[
elec_cmd
' --port='
num2str
(
port
)
' --title="figure '
num2str
(
fignum
)
'"'
' &'
]
;
system
(
cmd
);
cmd
=
[
elec_cmd
' --port='
num2str
(
port
)
' --title="figure '
num2str
(
fignum
)
'"'
' &'
]
system
(
cmd
,
'PATH'
,
px
);
end
function
launch_electron_windows
(
port
,
fignum
,
workdir
,
leverpath
,
strDB
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment