mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -05:00
📎 Fix linter issues
This commit is contained in:
parent
f9b44ccc5c
commit
1649ca4ff7
6 changed files with 6 additions and 17 deletions
|
@ -9,7 +9,6 @@
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
[app.common.pages.helpers :as cph]
|
[app.common.pages.helpers :as cph]
|
||||||
[app.common.uuid :as uuid]
|
|
||||||
[app.main.ui.context :as muc]
|
[app.main.ui.context :as muc]
|
||||||
[app.main.ui.hooks :as h]
|
[app.main.ui.hooks :as h]
|
||||||
[app.main.ui.shapes.attrs :as attrs]
|
[app.main.ui.shapes.attrs :as attrs]
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
[app.common.colors :as clr]
|
[app.common.colors :as clr]
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.geom.shapes :as gsh]
|
[app.common.geom.shapes :as gsh]
|
||||||
[app.main.ui.context :as muc]
|
|
||||||
[app.main.ui.shapes.attrs :as attrs]
|
[app.main.ui.shapes.attrs :as attrs]
|
||||||
[app.main.ui.shapes.text.styles :as sts]
|
[app.main.ui.shapes.text.styles :as sts]
|
||||||
[app.util.color :as uc]
|
[app.util.color :as uc]
|
||||||
|
@ -182,7 +181,7 @@
|
||||||
;; We add 8px to add a padding for the exporter
|
;; We add 8px to add a padding for the exporter
|
||||||
;; width (+ width 8)
|
;; width (+ width 8)
|
||||||
|
|
||||||
[colors color-mapping color-mapping-inverse] (retrieve-colors shape)]
|
[colors _color-mapping color-mapping-inverse] (retrieve-colors shape)]
|
||||||
|
|
||||||
[:foreignObject
|
[:foreignObject
|
||||||
{:x x
|
{:x x
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
|
|
||||||
(mf/defc viewer-pagination-and-sidebar
|
(mf/defc viewer-pagination-and-sidebar
|
||||||
{::mf/wrap [mf/memo]}
|
{::mf/wrap [mf/memo]}
|
||||||
[{:keys [section index frames users frame page]}]
|
[{:keys [section index users frame page]}]
|
||||||
(let [comments-local (mf/deref refs/comments-local)
|
(let [comments-local (mf/deref refs/comments-local)
|
||||||
show-sidebar? (and (= section :comments) (:show-sidebar? comments-local))]
|
show-sidebar? (and (= section :comments) (:show-sidebar? comments-local))]
|
||||||
[:*
|
[:*
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
:page page}])]))
|
:page page}])]))
|
||||||
|
|
||||||
(mf/defc viewer-overlay
|
(mf/defc viewer-overlay
|
||||||
[{:keys [overlay file page frame zoom wrapper-size close-overlay interactions-mode]}]
|
[{:keys [overlay page frame zoom wrapper-size close-overlay interactions-mode]}]
|
||||||
(let [close-click-outside? (:close-click-outside overlay)
|
(let [close-click-outside? (:close-click-outside overlay)
|
||||||
background-overlay? (:background-overlay overlay)
|
background-overlay? (:background-overlay overlay)
|
||||||
overlay-frame (:frame overlay)
|
overlay-frame (:frame overlay)
|
||||||
|
@ -144,7 +144,7 @@
|
||||||
|
|
||||||
|
|
||||||
(mf/defc viewer-wrapper
|
(mf/defc viewer-wrapper
|
||||||
[{:keys [wrapper-size scroll orig-frame orig-viewport-ref orig-size page file users current-viewport-ref
|
[{:keys [wrapper-size orig-frame orig-viewport-ref orig-size page file users current-viewport-ref
|
||||||
size frame interactions-mode overlays zoom close-overlay section index] :as props}]
|
size frame interactions-mode overlays zoom close-overlay section index] :as props}]
|
||||||
[:*
|
[:*
|
||||||
[:& viewer-pagination-and-sidebar
|
[:& viewer-pagination-and-sidebar
|
||||||
|
@ -171,7 +171,6 @@
|
||||||
:frame-offset (gpt/point 0 0)
|
:frame-offset (gpt/point 0 0)
|
||||||
:size orig-size
|
:size orig-size
|
||||||
:page page
|
:page page
|
||||||
:file file
|
|
||||||
:users users
|
:users users
|
||||||
:interactions-mode :hide}]])
|
:interactions-mode :hide}]])
|
||||||
|
|
||||||
|
@ -191,7 +190,6 @@
|
||||||
|
|
||||||
(for [overlay overlays]
|
(for [overlay overlays]
|
||||||
[:& viewer-overlay {:overlay overlay
|
[:& viewer-overlay {:overlay overlay
|
||||||
:file file
|
|
||||||
:key (dm/str (:id overlay))
|
:key (dm/str (:id overlay))
|
||||||
:page page
|
:page page
|
||||||
:frame frame
|
:frame frame
|
||||||
|
@ -254,7 +252,6 @@
|
||||||
frame (get frames index)
|
frame (get frames index)
|
||||||
|
|
||||||
fullscreen? (mf/deref header/fullscreen-ref)
|
fullscreen? (mf/deref header/fullscreen-ref)
|
||||||
overlays (:overlays local)
|
|
||||||
overlays (mf/deref current-overlays-ref)
|
overlays (mf/deref current-overlays-ref)
|
||||||
scroll (mf/use-state nil)
|
scroll (mf/use-state nil)
|
||||||
|
|
||||||
|
@ -464,7 +461,6 @@
|
||||||
[:& (mf/provider ctx/current-zoom) {:value zoom}
|
[:& (mf/provider ctx/current-zoom) {:value zoom}
|
||||||
[:& viewer-wrapper
|
[:& viewer-wrapper
|
||||||
{:wrapper-size wrapper-size
|
{:wrapper-size wrapper-size
|
||||||
:scroll @scroll
|
|
||||||
:orig-frame orig-frame
|
:orig-frame orig-frame
|
||||||
:orig-viewport-ref orig-viewport-ref
|
:orig-viewport-ref orig-viewport-ref
|
||||||
:orig-size orig-size
|
:orig-size orig-size
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
(ns app.main.ui.viewer.comments
|
(ns app.main.ui.viewer.comments
|
||||||
(:require
|
(:require
|
||||||
[app.common.data :as d]
|
[app.common.data :as d]
|
||||||
[app.common.data.macros :as dm]
|
|
||||||
[app.common.geom.matrix :as gmt]
|
[app.common.geom.matrix :as gmt]
|
||||||
[app.common.geom.point :as gpt]
|
[app.common.geom.point :as gpt]
|
||||||
[app.common.geom.shapes :as gsh]
|
[app.common.geom.shapes :as gsh]
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
[app.main.data.viewer :as dv]
|
[app.main.data.viewer :as dv]
|
||||||
[app.main.data.viewer.shortcuts :as sc]
|
[app.main.data.viewer.shortcuts :as sc]
|
||||||
[app.main.refs :as refs]
|
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.components.dropdown :refer [dropdown]]
|
[app.main.ui.components.dropdown :refer [dropdown]]
|
||||||
[app.main.ui.export :refer [export-progress-widget]]
|
[app.main.ui.export :refer [export-progress-widget]]
|
||||||
|
|
|
@ -17,13 +17,12 @@
|
||||||
[app.main.refs :as refs]
|
[app.main.refs :as refs]
|
||||||
[app.main.store :as st]
|
[app.main.store :as st]
|
||||||
[app.main.ui.components.dropdown :refer [dropdown]]
|
[app.main.ui.components.dropdown :refer [dropdown]]
|
||||||
[app.main.ui.icons :as i]
|
|
||||||
[app.main.ui.hooks :as h]
|
[app.main.ui.hooks :as h]
|
||||||
|
[app.main.ui.icons :as i]
|
||||||
[app.main.ui.viewer.shapes :as shapes]
|
[app.main.ui.viewer.shapes :as shapes]
|
||||||
[app.util.dom :as dom]
|
[app.util.dom :as dom]
|
||||||
[app.util.i18n :as i18n :refer [tr]]
|
[app.util.i18n :as i18n :refer [tr]]
|
||||||
[app.util.keyboard :as kbd]
|
[app.util.keyboard :as kbd]
|
||||||
[app.util.object :as obj]
|
|
||||||
[goog.events :as events]
|
[goog.events :as events]
|
||||||
[rumext.alpha :as mf]))
|
[rumext.alpha :as mf]))
|
||||||
|
|
||||||
|
@ -75,8 +74,7 @@
|
||||||
[:& wrapper {:shape frame :view-box vbox}]]]]))
|
[:& wrapper {:shape frame :view-box vbox}]]]]))
|
||||||
|
|
||||||
(mf/defc viewport
|
(mf/defc viewport
|
||||||
{
|
{::mf/wrap [mf/memo]
|
||||||
::mf/wrap [mf/memo]
|
|
||||||
::mf/wrap-props false}
|
::mf/wrap-props false}
|
||||||
[props]
|
[props]
|
||||||
(let [;; NOTE: with `use-equal-memo` hook we ensure that all values
|
(let [;; NOTE: with `use-equal-memo` hook we ensure that all values
|
||||||
|
@ -90,7 +88,6 @@
|
||||||
frame (unchecked-get props "frame")
|
frame (unchecked-get props "frame")
|
||||||
base (unchecked-get props "base-frame")]
|
base (unchecked-get props "base-frame")]
|
||||||
|
|
||||||
|
|
||||||
(mf/with-effect [mode]
|
(mf/with-effect [mode]
|
||||||
(let [on-click
|
(let [on-click
|
||||||
(fn [_]
|
(fn [_]
|
||||||
|
|
Loading…
Add table
Reference in a new issue