ske library support

This commit is contained in:
Ozbolt Menegatti 2020-03-30 20:27:58 +02:00
parent 1e84d965ff
commit 113efc1d23
3 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,7 @@
"browserify": "^16.5.0", "browserify": "^16.5.0",
"esmify": "^2.1.1", "esmify": "^2.1.1",
"picnic": "^6.5.2", "picnic": "^6.5.2",
"ske-lexonomy": "^0.0.x",
"snabbdom": "^0.7.4", "snabbdom": "^0.7.4",
"tinyify": "^2.5.2" "tinyify": "^2.5.2"
} }

5
src/lib/ske.py Normal file
View File

@ -0,0 +1,5 @@
__pragma__ ('noanno')
__pragma__ ('js', "var s_ske = require('ske-lexonomy');", None)
# export the symbols
SkeLexonomy = s_ske

View File

@ -2,6 +2,7 @@ from model.entry import Entry
from model.example import Example from model.example import Example
from browser import window from browser import window
from model.example_clusters import ExampleClusters from model.example_clusters import ExampleClusters
from lib import ske
class Model: class Model:
@ -31,6 +32,9 @@ class Model:
# hiding cluster numbers # hiding cluster numbers
self.clusters_shown = True self.clusters_shown = True
# ske interface
self.ske = __new__(ske.SkeLexonomy());
def reset(self): def reset(self):
# do both resets at once # do both resets at once
self.pre_reset() self.pre_reset()