Skip to content

Commit

Permalink
Merge pull request #271 from openearth/Fix/3dviewer-and-image-animation
Browse files Browse the repository at this point in the history
fix error key bindings
  • Loading branch information
CindyvdVries committed Jul 30, 2020
2 parents 15433db + 8a969dc commit 9281939
Show file tree
Hide file tree
Showing 3 changed files with 199 additions and 82 deletions.
15 changes: 14 additions & 1 deletion src/components/Viewer3DComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,26 @@

<template v-for="x in 9">
<line
:key="`line-${x}`"
x1="30"
x2="40"
:y1="(x / 10) * height"
:y2="(x / 10) * height"
style="stroke:#999;stroke-width:2"
/>
<text x="41" :y="(x / 10) * height + 5" fill="#999">
<text
:key="`text-${x}`"
x="41"
:y="(x / 10) * height + 5"
fill="#999"
>
0.{{ 10 - x }}
</text>
</template>

<template v-for="x in 10">
<line
:key="`index-${x}`"
x1="30"
x2="35"
:y1="((x - 0.5) / 10) * height"
Expand Down Expand Up @@ -588,6 +595,9 @@ export default {
this.$nextTick(() => {
$('.pick-a-color').each((i, e) => {
if ($(e).parent('.pick-a-color-markup').length === 0) {
if (typeof $(e).colorpicker !== 'function') {
return
}
$(e).colorpicker({
useHashPrefix: false
})
Expand Down Expand Up @@ -706,6 +716,9 @@ export default {
removePoint (index) {
this.gradient.splice(index, 1)
this.gradient.forEach((grad, i) => {
if (typeof $(this.$refs.colorpicker[i]).colorpicker !== 'function') {
return
}
$(this.$refs.colorpicker[i]).colorpicker('setValue', `#${grad.color}`)
})
},
Expand Down
Loading

0 comments on commit 9281939

Please sign in to comment.