mirror of
https://github.com/penpot/penpot.git
synced 2026-07-31 18:36:18 +00:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
4ed093f28f
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
### :sparkles: New features
|
### :sparkles: New features
|
||||||
|
|
||||||
|
- Constraints are not well assigned when default and multiselection [Taiga #3069](https://tree.taiga.io/project/penpot/issue/3069)
|
||||||
- Exporting big files flow [Taiga #2218](https://tree.taiga.io/project/penpot/us/2218)
|
- Exporting big files flow [Taiga #2218](https://tree.taiga.io/project/penpot/us/2218)
|
||||||
- Multiexport from main menu [Taiga #520](https://tree.taiga.io/project/penpot/us/28541)
|
- Multiexport from main menu [Taiga #520](https://tree.taiga.io/project/penpot/us/28541)
|
||||||
- Multipexport assets (aka bulk export) [Taiga #520](https://tree.taiga.io/project/penpot/us/520)
|
- Multipexport assets (aka bulk export) [Taiga #520](https://tree.taiga.io/project/penpot/us/520)
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
[app.common.colors :as clr]
|
[app.common.colors :as clr]
|
||||||
[app.common.uuid :as uuid]))
|
[app.common.uuid :as uuid]))
|
||||||
|
|
||||||
(def file-version 15)
|
(def file-version 16)
|
||||||
(def default-color clr/gray-20)
|
(def default-color clr/gray-20)
|
||||||
(def root uuid/zero)
|
(def root uuid/zero)
|
||||||
|
|
||||||
|
|||||||
@ -355,3 +355,19 @@
|
|||||||
(update-page [_ page]
|
(update-page [_ page]
|
||||||
(update page :objects #(d/mapm update-object %)))]
|
(update page :objects #(d/mapm update-object %)))]
|
||||||
(update data :pages-index #(d/mapm update-page %))))
|
(update data :pages-index #(d/mapm update-page %))))
|
||||||
|
|
||||||
|
;; Add fills and strokes to components
|
||||||
|
|
||||||
|
(defmethod migrate 16
|
||||||
|
[data]
|
||||||
|
(letfn [(update-object [_ object]
|
||||||
|
(cond-> object
|
||||||
|
(and (not (= :text (:type object))) (nil? (:strokes object)))
|
||||||
|
(set-strokes)
|
||||||
|
|
||||||
|
(and (not (= :text (:type object))) (nil? (:fills object)))
|
||||||
|
(set-fills)))
|
||||||
|
(update-container [_ container]
|
||||||
|
(update container :objects #(d/mapm update-object %)))]
|
||||||
|
(-> data
|
||||||
|
(update :components #(d/mapm update-container %)))))
|
||||||
|
|||||||
@ -73,12 +73,14 @@
|
|||||||
|
|
||||||
(defn pdf
|
(defn pdf
|
||||||
([page] (pdf page {}))
|
([page] (pdf page {}))
|
||||||
([page {:keys [scale save-path]
|
([page {:keys [scale save-path page-ranges]
|
||||||
:or {scale 1}}]
|
:or {page-ranges "1"
|
||||||
(.pdf ^js page #js {:path save-path
|
scale 1}}]
|
||||||
:scale scale
|
(.pdf ^js page #js {:path save-path
|
||||||
:printBackground true
|
:scale scale
|
||||||
:preferCSSPageSize true})))
|
:pageRanges page-ranges
|
||||||
|
:printBackground true
|
||||||
|
:preferCSSPageSize true})))
|
||||||
(defn eval!
|
(defn eval!
|
||||||
[frame f]
|
[frame f]
|
||||||
(.evaluate ^js frame f))
|
(.evaluate ^js frame f))
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
(ns app.main.ui.render
|
(ns app.main.ui.render
|
||||||
(: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]
|
||||||
@ -103,8 +104,8 @@
|
|||||||
|
|
||||||
(mf/with-effect [width height]
|
(mf/with-effect [width height]
|
||||||
(dom/set-page-style!
|
(dom/set-page-style!
|
||||||
{:size (str (mth/ceil width) "px "
|
{:size (dm/str (mth/ceil width) "px "
|
||||||
(mth/ceil height) "px")}))
|
(mth/ceil height) "px")}))
|
||||||
|
|
||||||
[:& (mf/provider embed/context) {:value embed?}
|
[:& (mf/provider embed/context) {:value embed?}
|
||||||
[:svg {:id "screenshot"
|
[:svg {:id "screenshot"
|
||||||
|
|||||||
@ -45,12 +45,13 @@
|
|||||||
|
|
||||||
in-frame? (and (some? ids)
|
in-frame? (and (some? ids)
|
||||||
(not= (:parent-id values) uuid/zero))
|
(not= (:parent-id values) uuid/zero))
|
||||||
|
|
||||||
;; TODO: uncomment when fixed-scroll is fully implemented
|
;; TODO: uncomment when fixed-scroll is fully implemented
|
||||||
;; first-level? (and in-frame?
|
;; first-level? (and in-frame?
|
||||||
;; (= (:parent-id values) (:frame-id values)))
|
;; (= (:parent-id values) (:frame-id values)))
|
||||||
|
|
||||||
constraints-h (get values :constraints-h (gsh/default-constraints-h values))
|
constraints-h (or (get values :constraints-h) (gsh/default-constraints-h values))
|
||||||
constraints-v (get values :constraints-v (gsh/default-constraints-v values))
|
constraints-v (or (get values :constraints-v) (gsh/default-constraints-v values))
|
||||||
|
|
||||||
on-constraint-button-clicked
|
on-constraint-button-clicked
|
||||||
(mf/use-callback
|
(mf/use-callback
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user