深度画布更改
This commit is contained in:
@@ -121,8 +121,8 @@ export class LayerManager {
|
||||
|
||||
/** 设置图层位置-不设置默认居中 */
|
||||
setLayerPosition(object, options?: any) {
|
||||
const width = this.canvasManager.canvasWidth
|
||||
const height = this.canvasManager.canvasHeight
|
||||
const width = this.canvasManager.canvas.clipPath.width
|
||||
const height = this.canvasManager.canvas.clipPath.height
|
||||
|
||||
if (options && options.top !== undefined) {
|
||||
object.set({ top: options.top })
|
||||
@@ -294,8 +294,7 @@ export class LayerManager {
|
||||
|
||||
/** 创建图片图层 */
|
||||
async createImageLayer(imgOrUrl: string | HTMLImageElement, options?: any, isRecord = true) {
|
||||
const canvasWidth = this.canvasManager.canvasWidth
|
||||
const canvasHeight = this.canvasManager.canvasHeight
|
||||
const { canvasWidth, canvasHeight } = this.canvasManager.getCanvasSize();
|
||||
|
||||
const imageObject = await new Promise((resolve) => {
|
||||
const url = typeof imgOrUrl === 'string' ? imgOrUrl : imgOrUrl.src
|
||||
|
||||
Reference in New Issue
Block a user