mirror of https://github.com/penpot/penpot.git
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
cea10308b7
|
|
@ -41,6 +41,8 @@
|
||||||
### :bug: Bugs fixed
|
### :bug: Bugs fixed
|
||||||
|
|
||||||
- Fix setting a portion of text as bold or underline messes things up [Github #7980](https://github.com/penpot/penpot/issues/7980)
|
- Fix setting a portion of text as bold or underline messes things up [Github #7980](https://github.com/penpot/penpot/issues/7980)
|
||||||
|
- Fix problem with style in fonts input [Taiga #12935](https://tree.taiga.io/project/penpot/issue/12935)
|
||||||
|
- Fix problem with path editor and right click [Github #7917](https://github.com/penpot/penpot/issues/7917)
|
||||||
|
|
||||||
|
|
||||||
## 2.12.0
|
## 2.12.0
|
||||||
|
|
|
||||||
|
|
@ -360,7 +360,9 @@
|
||||||
(st/emit! (modal/show options)))))]
|
(st/emit! (modal/show options)))))]
|
||||||
|
|
||||||
[:div {:class (stl/css :font-item :table-row)}
|
[:div {:class (stl/css :font-item :table-row)}
|
||||||
[:div {:class (stl/css :table-field :family)}
|
[:div {:class (stl/css-case :table-field true
|
||||||
|
:family true
|
||||||
|
:is-edition edition?)}
|
||||||
(if ^boolean edition?
|
(if ^boolean edition?
|
||||||
[:input {:type "text"
|
[:input {:type "text"
|
||||||
:auto-focus true
|
:auto-focus true
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,9 @@
|
||||||
@include twoLineTextEllipsis;
|
@include twoLineTextEllipsis;
|
||||||
min-width: $sz-200;
|
min-width: $sz-200;
|
||||||
width: $sz-200;
|
width: $sz-200;
|
||||||
|
&.is-edition {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .filenames {
|
> .filenames {
|
||||||
|
|
|
||||||
|
|
@ -65,34 +65,35 @@
|
||||||
|
|
||||||
on-pointer-down
|
on-pointer-down
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(dom/stop-propagation event)
|
(when (dom/left-mouse? event)
|
||||||
(dom/prevent-default event)
|
(dom/stop-propagation event)
|
||||||
|
(dom/prevent-default event)
|
||||||
|
|
||||||
;; FIXME: revisit this, using meta here breaks equality checks
|
;; FIXME: revisit this, using meta here breaks equality checks
|
||||||
(when (and is-new (some? (meta position)))
|
(when (and is-new (some? (meta position)))
|
||||||
(st/emit! (drp/create-node-at-position (meta position))))
|
(st/emit! (drp/create-node-at-position (meta position))))
|
||||||
|
|
||||||
(let [is-shift (kbd/shift? event)
|
(let [is-shift (kbd/shift? event)
|
||||||
is-mod (kbd/mod? event)]
|
is-mod (kbd/mod? event)]
|
||||||
(cond
|
(cond
|
||||||
is-last
|
is-last
|
||||||
(st/emit! (drp/reset-last-handler))
|
(st/emit! (drp/reset-last-handler))
|
||||||
|
|
||||||
(and is-move is-mod (not is-curve))
|
(and is-move is-mod (not is-curve))
|
||||||
(st/emit! (drp/make-curve position))
|
(st/emit! (drp/make-curve position))
|
||||||
|
|
||||||
(and is-move is-mod is-curve)
|
(and is-move is-mod is-curve)
|
||||||
(st/emit! (drp/make-corner position))
|
(st/emit! (drp/make-corner position))
|
||||||
|
|
||||||
is-move
|
is-move
|
||||||
;; If we're dragging a selected item we don't change the selection
|
;; If we're dragging a selected item we don't change the selection
|
||||||
(st/emit! (drp/start-move-path-point position is-shift))
|
(st/emit! (drp/start-move-path-point position is-shift))
|
||||||
|
|
||||||
(and is-draw is-start-path)
|
(and is-draw is-start-path)
|
||||||
(st/emit! (drp/start-path-from-point position))
|
(st/emit! (drp/start-path-from-point position))
|
||||||
|
|
||||||
(and is-draw (not is-start-path))
|
(and is-draw (not is-start-path))
|
||||||
(st/emit! (drp/close-path-drag-start position)))))]
|
(st/emit! (drp/close-path-drag-start position))))))]
|
||||||
|
|
||||||
[:g.path-point
|
[:g.path-point
|
||||||
[:circle.path-point
|
[:circle.path-point
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@
|
||||||
;; FIXME: rename; confunsing name
|
;; FIXME: rename; confunsing name
|
||||||
[app.render-wasm.wasm :as wasm]
|
[app.render-wasm.wasm :as wasm]
|
||||||
[app.util.debug :as dbg]
|
[app.util.debug :as dbg]
|
||||||
|
[app.util.dom :as dom]
|
||||||
[app.util.functions :as fns]
|
[app.util.functions :as fns]
|
||||||
[app.util.globals :as ug]
|
[app.util.globals :as ug]
|
||||||
[app.util.modules :as mod]
|
[app.util.modules :as mod]
|
||||||
|
|
@ -1230,6 +1231,13 @@
|
||||||
(re-find #"(?i)edge" user-agent) :edge
|
(re-find #"(?i)edge" user-agent) :edge
|
||||||
:else :unknown)))))
|
:else :unknown)))))
|
||||||
|
|
||||||
|
(defn- on-webgl-context-lost
|
||||||
|
[event]
|
||||||
|
(dom/prevent-default event)
|
||||||
|
(reset! wasm/context-lost? true)
|
||||||
|
(log/warn :hint "WebGL context lost")
|
||||||
|
(st/emit! (drw/context-lost)))
|
||||||
|
|
||||||
(defn init-canvas-context
|
(defn init-canvas-context
|
||||||
[canvas]
|
[canvas]
|
||||||
(let [gl (unchecked-get wasm/internal-module "GL")
|
(let [gl (unchecked-get wasm/internal-module "GL")
|
||||||
|
|
@ -1257,14 +1265,8 @@
|
||||||
(set-canvas-size canvas)
|
(set-canvas-size canvas)
|
||||||
|
|
||||||
;; Add event listeners for WebGL context lost
|
;; Add event listeners for WebGL context lost
|
||||||
(let [handler (fn [event]
|
(set! wasm/canvas canvas)
|
||||||
(.preventDefault event)
|
(.addEventListener canvas "webglcontextlost" on-webgl-context-lost)
|
||||||
(reset! wasm/context-lost? true)
|
|
||||||
(log/warn :hint "WebGL context lost")
|
|
||||||
(st/emit! (drw/context-lost)))]
|
|
||||||
(set! wasm/context-lost-handler handler)
|
|
||||||
(set! wasm/context-lost-canvas canvas)
|
|
||||||
(.addEventListener canvas "webglcontextlost" handler))
|
|
||||||
(set! wasm/context-initialized? true)))
|
(set! wasm/context-initialized? true)))
|
||||||
|
|
||||||
context-init?))
|
context-init?))
|
||||||
|
|
@ -1278,10 +1280,9 @@
|
||||||
(h/call wasm/internal-module "_clean_up")
|
(h/call wasm/internal-module "_clean_up")
|
||||||
|
|
||||||
;; Remove event listener for WebGL context lost
|
;; Remove event listener for WebGL context lost
|
||||||
(when (and wasm/context-lost-handler wasm/context-lost-canvas)
|
(when wasm/canvas
|
||||||
(.removeEventListener wasm/context-lost-canvas "webglcontextlost" wasm/context-lost-handler)
|
(.removeEventListener wasm/canvas "webglcontextlost" on-webgl-context-lost)
|
||||||
(set! wasm/context-lost-canvas nil)
|
(set! wasm/canvas nil))
|
||||||
(set! wasm/context-lost-handler nil))
|
|
||||||
|
|
||||||
;; Ensure the WebGL context is properly disposed so browsers do not keep
|
;; Ensure the WebGL context is properly disposed so browsers do not keep
|
||||||
;; accumulating active contexts between page switches.
|
;; accumulating active contexts between page switches.
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,20 @@
|
||||||
|
|
||||||
(defonce internal-frame-id nil)
|
(defonce internal-frame-id nil)
|
||||||
(defonce internal-module #js {})
|
(defonce internal-module #js {})
|
||||||
|
|
||||||
|
;; Reference to the HTML canvas element.
|
||||||
|
(defonce canvas nil)
|
||||||
|
|
||||||
|
;; Reference to the Emscripten GL context wrapper.
|
||||||
(defonce gl-context-handle nil)
|
(defonce gl-context-handle nil)
|
||||||
|
|
||||||
|
;; Reference to the actual WebGL Context returned
|
||||||
|
;; by the `.getContext` method of the canvas.
|
||||||
(defonce gl-context nil)
|
(defonce gl-context nil)
|
||||||
|
|
||||||
|
(defonce context-initialized? false)
|
||||||
|
(defonce context-lost? (atom false))
|
||||||
|
|
||||||
(defonce serializers
|
(defonce serializers
|
||||||
#js {:blur-type shared/RawBlurType
|
#js {:blur-type shared/RawBlurType
|
||||||
:blend-mode shared/RawBlendMode
|
:blend-mode shared/RawBlendMode
|
||||||
|
|
@ -44,8 +56,3 @@
|
||||||
:stroke-linecap shared/RawStrokeLineCap
|
:stroke-linecap shared/RawStrokeLineCap
|
||||||
:stroke-linejoin shared/RawStrokeLineJoin
|
:stroke-linejoin shared/RawStrokeLineJoin
|
||||||
:fill-rule shared/RawFillRule})
|
:fill-rule shared/RawFillRule})
|
||||||
|
|
||||||
(defonce context-initialized? false)
|
|
||||||
(defonce context-lost? (atom false))
|
|
||||||
(defonce context-lost-handler nil)
|
|
||||||
(defonce context-lost-canvas nil)
|
|
||||||
Loading…
Reference in New Issue