first ver

This commit is contained in:
Henry Jameson 2018-01-29 10:47:26 +03:00
parent cd3bf461db
commit b10787d23c
4 changed files with 85 additions and 1 deletions

View file

@ -0,0 +1,29 @@
import fileTypeService from '../../services/file_type/file_type.service.js'
const StillImage = {
props: [
'src',
'referrerpolicy',
'mimetype'
],
data () {
return {
hideNsfwLocal: this.$store.state.config.hideNsfw,
}
},
computed: {
animated () {
return this.mimetype === 'image/gif'
}
},
methods: {
drawCanvas() {
const canvas = this.$refs.canvas
if (!canvas) return
const ctx = canvas.getContext('2d')
ctx.drawImage(this.$refs.src, 1, 1, canvas.width, canvas.height)
}
}
}
export default StillImage