mirror of
https://github.com/penpot/penpot.git
synced 2026-03-17 16:06:24 +00:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
### :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)
|
||||
- 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)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
[app.common.colors :as clr]
|
||||
[app.common.uuid :as uuid]))
|
||||
|
||||
(def file-version 15)
|
||||
(def file-version 16)
|
||||
(def default-color clr/gray-20)
|
||||
(def root uuid/zero)
|
||||
|
||||
|
||||
@@ -355,3 +355,19 @@
|
||||
(update-page [_ page]
|
||||
(update page :objects #(d/mapm update-object %)))]
|
||||
(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
|
||||
([page] (pdf page {}))
|
||||
([page {:keys [scale save-path]
|
||||
:or {scale 1}}]
|
||||
(.pdf ^js page #js {:path save-path
|
||||
:scale scale
|
||||
:printBackground true
|
||||
:preferCSSPageSize true})))
|
||||
([page {:keys [scale save-path page-ranges]
|
||||
:or {page-ranges "1"
|
||||
scale 1}}]
|
||||
(.pdf ^js page #js {:path save-path
|
||||
:scale scale
|
||||
:pageRanges page-ranges
|
||||
:printBackground true
|
||||
:preferCSSPageSize true})))
|
||||
(defn eval!
|
||||
[frame f]
|
||||
(.evaluate ^js frame f))
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
(ns app.main.ui.render
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.geom.matrix :as gmt]
|
||||
[app.common.geom.point :as gpt]
|
||||
[app.common.geom.shapes :as gsh]
|
||||
@@ -103,8 +104,8 @@
|
||||
|
||||
(mf/with-effect [width height]
|
||||
(dom/set-page-style!
|
||||
{:size (str (mth/ceil width) "px "
|
||||
(mth/ceil height) "px")}))
|
||||
{:size (dm/str (mth/ceil width) "px "
|
||||
(mth/ceil height) "px")}))
|
||||
|
||||
[:& (mf/provider embed/context) {:value embed?}
|
||||
[:svg {:id "screenshot"
|
||||
|
||||
@@ -45,12 +45,13 @@
|
||||
|
||||
in-frame? (and (some? ids)
|
||||
(not= (:parent-id values) uuid/zero))
|
||||
|
||||
;; TODO: uncomment when fixed-scroll is fully implemented
|
||||
;; first-level? (and in-frame?
|
||||
;; (= (:parent-id values) (:frame-id values)))
|
||||
|
||||
constraints-h (get values :constraints-h (gsh/default-constraints-h values))
|
||||
constraints-v (get values :constraints-v (gsh/default-constraints-v values))
|
||||
constraints-h (or (get values :constraints-h) (gsh/default-constraints-h values))
|
||||
constraints-v (or (get values :constraints-v) (gsh/default-constraints-v values))
|
||||
|
||||
on-constraint-button-clicked
|
||||
(mf/use-callback
|
||||
|
||||
Reference in New Issue
Block a user