Skip to content

Commit 2ce67d1

Browse files
committed
Add loading box and center loading text within frame
1 parent 4993035 commit 2ce67d1

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"LICENSE"
1616
],
1717
"private": false,
18-
"version": "0.0.9",
18+
"version": "0.0.10",
1919
"description": "Vue wrapper for JSME-Editor",
2020
"keywords": [
2121
"chemistry",

src/components/JSME.vue

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
11
<template>
22
<div>
3-
<div :id="props.id"></div>
4-
{{ jsmeIsLoadedInternal ? "" : "JSME is loading, or JS is disabled" }}
3+
<div
4+
:style="{
5+
width: props.width,
6+
height: props.height,
7+
outline: jsmeIsLoadedInternal ? '' : '1px solid black',
8+
outlineOffset: '-.5px',
9+
textAlign: 'center',
10+
}"
11+
>
12+
<div :id="props.id"></div>
13+
<div
14+
v-if="!jsmeIsLoadedInternal"
15+
:style="{
16+
position: 'absolute',
17+
top: '50%',
18+
left: '50%',
19+
transform: 'translate(-50%, -50%)',
20+
'-webkit-transform': 'translate(-50%, -50%)',
21+
}"
22+
>
23+
JSME is loading, or JS is disabled
24+
</div>
25+
</div>
526
<div>
6-
<div v-if="jsmeIsLoadedInternal" :style="{ width: props.width }">
27+
<div v-if="jsmeIsLoadedInternal">
728
<div
829
style="
930
width: 100%;

0 commit comments

Comments
 (0)