deepscan fixes
This commit is contained in:
parent
0115a46d8a
commit
18f588dc99
2 changed files with 9 additions and 12 deletions
|
@ -1,9 +1,6 @@
|
|||
import { useRef } from 'react'
|
||||
import Svg from '../../draft/svg'
|
||||
import Defs from '../../draft/defs'
|
||||
import Stack from './part'
|
||||
import SvgWrapper from '../../draft/svg-wrapper'
|
||||
import { getProps } from '../../draft/utils'
|
||||
import { PartInner } from '../../draft/part'
|
||||
|
||||
const Draft = (props) => {
|
||||
|
|
|
@ -168,10 +168,10 @@ const basePlugin = ({
|
|||
const [h, w] = so.size
|
||||
const cols = Math.ceil(so.width / w)
|
||||
const rows = Math.ceil(so.height / h)
|
||||
const { points, Point, paths, Path, macro } = shorthand
|
||||
const { points, Point, paths, Path, part, macro, store } = shorthand
|
||||
let count = 0
|
||||
let withContent = {}
|
||||
shorthand.part.topLeft = so.layout.topLeft || { x: 0, y: 0 }
|
||||
part.topLeft = so.layout.topLeft || { x: 0, y: 0 }
|
||||
|
||||
// get the layout from the pattern
|
||||
const { layout } = so
|
||||
|
@ -212,9 +212,9 @@ const basePlugin = ({
|
|||
|
||||
if (col === cols - 1 && row === rows - 1) {
|
||||
const br = points[`${pageName}-br`]
|
||||
shorthand.part.width = br.x
|
||||
shorthand.part.height = br.y
|
||||
shorthand.part.bottomRight = { x: br.x, y: br.y }
|
||||
part.width = br.x
|
||||
part.height = br.y
|
||||
part.bottomRight = { x: br.x, y: br.y }
|
||||
}
|
||||
|
||||
if (!printStyle) {
|
||||
|
@ -227,14 +227,14 @@ const basePlugin = ({
|
|||
} else {
|
||||
paths[pageName].attr('class', 'interfacing stroke-xs')
|
||||
// add markers and rulers
|
||||
shorthand.macro('addPageMarkers', { row, col, pageName, withContent }, shorthand)
|
||||
shorthand.macro('addRuler', { xAxis: true, pageName }, shorthand)
|
||||
shorthand.macro('addRuler', { xAxis: false, pageName }, shorthand)
|
||||
macro('addPageMarkers', { row, col, pageName, withContent }, shorthand)
|
||||
macro('addRuler', { xAxis: true, pageName }, shorthand)
|
||||
macro('addRuler', { xAxis: false, pageName }, shorthand)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Store page count in part
|
||||
shorthand.store.set(partName, { cols, rows, count, withContent, width: w, height: h })
|
||||
store.set(partName, { cols, rows, count, withContent, width: w, height: h })
|
||||
},
|
||||
/** add a ruler to the top left corner of the page */
|
||||
addRuler({ xAxis, pageName }, shorthand) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue