add art.isRotate

This commit is contained in:
Harvey committed 2022-09-26 18:28:22 +08:00
1 parent 1cbef4c6f4
commit af6e936854
4 files changed
+5 -4

No files matched your search

+1 -2
View File
@@ -129,8 +129,7 @@ export default function progress(options) {
proxy($control, 'click', (event) => {
if (event.target !== $indicator) {
const autoOrientation = art.plugins.autoOrientation && art.plugins.autoOrientation.state;
if (autoOrientation) {
if (art.isRotate) {
const { clientHeight } = document.documentElement;
const percentage = event.pageY / clientHeight;
const second = percentage * art.duration;