fix: focal point should be only visible for images (#1311)

This commit is contained in:
Nolan Lawson 2019-07-07 13:24:49 -07:00 committed by GitHub
parent c2bda9b8f3
commit 9fd5c8f6d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -7,8 +7,8 @@
aria-hidden="true"
/>
<div class="compose-media-buttons">
<button class="compose-media-button compose-media-focal-button {type === 'audio' ? 'compose-media-hidden' : ''}"
aria-hidden={type === 'audio'}
<button class="compose-media-button compose-media-focal-button {focalHidden ? 'compose-media-hidden' : ''}"
aria-hidden={focalHidden}
aria-label="Change preview"
title="Change preview"
on:click="onSetFocalPoint()" >
@ -163,7 +163,8 @@
return 'center center'
}
return `${coordsToPercent(focusX)}% ${100 - coordsToPercent(focusY)}%`
}
},
focalHidden: ({ type }) => type !== 'image'
},
store: () => store,
methods: {