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

View file

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