-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into meta-model
- Loading branch information
Showing
12 changed files
with
104 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,7 @@ | |
<div id="vis" class="graphic"></div> | ||
|
||
<script src="refresh.js"></script> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
// Mimi UI | ||
|
||
function refresh(speclist) { | ||
function refresh(menu_item_list) { | ||
|
||
// Loop over the things that we want to show in the list, add | ||
// one button for each element as a child to the variablelist div | ||
|
||
var element = document.getElementById("variablelist"); | ||
|
||
for (var i in speclist) { | ||
for (var i in menu_item_list) { | ||
|
||
var newButton = document.createElement("button"); | ||
newButton.setAttribute("class", "tab"); | ||
|
||
// Return a closure with a copy of the spec that's private to the function | ||
// Set onclick for button | ||
newButton.onclick = (function() { | ||
var spec = speclist[i]["VLspec"]; | ||
|
||
var comp_name = menu_item_list[i]["comp_name"] | ||
var item_name = menu_item_list[i]["item_name"] | ||
|
||
return function() { | ||
vegaEmbed("#vis", spec, {actions: false}); | ||
sendMessageToJulia({cmd: 'display_spec', comp_name: comp_name, item_name: item_name}) | ||
} | ||
}()) | ||
|
||
newButton.appendChild(document.createTextNode(speclist[i]["name"])); | ||
})() | ||
|
||
newButton.appendChild(document.createTextNode(menu_item_list[i]["name"])); | ||
element.appendChild(newButton); | ||
} | ||
} | ||
|
||
function display(spec) { | ||
vegaEmbed("#vis", spec["VLspec"], {actions: false}); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Electron | ||
|
||
app = Application(); | ||
w = Window(app); | ||
|
||
# OLD 1 | ||
|
||
# function handle(message) | ||
# @info message["cmd"] | ||
# end | ||
|
||
# Electron.set_msg_handler(handle,w) | ||
|
||
# run(w, "const {ipcRenderer} = require('electron')") //done for me already | ||
# run(w, "ipcRenderer.send('msg-for-julia-process', {cmd: 'message for Julia'})") //done for me already | ||
|
||
# OLD 2 | ||
|
||
# @async begin | ||
# while true | ||
# m = read(w) | ||
# println(m) | ||
# end | ||
# end | ||
|
||
# CURRENT | ||
@async for msg in msgchannel(w) | ||
@info msg | ||
end | ||
|
||
run(w, "sendMessageToJulia({cmd: 'message for Julia'})") | ||
|
||
read(w) #to get the message |