diff options
| author | taehoon <th.dev91@gmail.com> | 2019-10-18 16:04:17 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-10-22 07:17:02 -0400 |
| commit | 0396c6f29d29f3c9d743e00955a25e2d844b02da (patch) | |
| tree | f9cfaad787c55cbdfd73b6966d13a3240cf6e415 /src/components/still-image | |
| parent | 6c4d23714a42dd59843a8fb905150eed2d5db29d (diff) | |
keep image natural ratio in gallery row
Diffstat (limited to 'src/components/still-image')
| -rw-r--r-- | src/components/still-image/still-image.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js index 02e98f19..9c2d446b 100644 --- a/src/components/still-image/still-image.js +++ b/src/components/still-image/still-image.js @@ -3,7 +3,8 @@ const StillImage = { 'src', 'referrerpolicy', 'mimetype', - 'imageLoadError' + 'imageLoadError', + 'imageLoadHandler' ], data () { return { @@ -17,6 +18,7 @@ const StillImage = { }, methods: { onLoad () { + this.imageLoadHandler && this.imageLoadHandler(this.$refs.src) const canvas = this.$refs.canvas if (!canvas) return const width = this.$refs.src.naturalWidth |
