Commit 33c22379 authored by 李维's avatar 李维

bug fix

parent 220e54ef
...@@ -193,7 +193,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy { ...@@ -193,7 +193,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
item.x = saveRect.x / saveData.scale + newRect.x item.x = saveRect.x / saveData.scale + newRect.x
item.y = saveRect.y / saveData.scale + newRect.y item.y = saveRect.y / saveData.scale + newRect.y
if(saveData.media.type == "Text") { if(saveData.media.type == "Text") {
return {width: this.itemWidth, height: this.itemHeight} return {width: this.itemWidth, height: this.itemHeight}
} }
}); });
...@@ -204,7 +203,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy { ...@@ -204,7 +203,7 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
item.audio_url = saveData.media.audio_url?saveData.media.audio_url:"" item.audio_url = saveData.media.audio_url?saveData.media.audio_url:""
} else { } else {
item.uid = uuid.v4() item.uid = uuid.v4()
item.initFont(Number(this.fontSize) * this.scale, this.fontName, this.fontColor) item.initFont(this.fontSize, this.fontName, this.fontColor)
item.init(this.defaultItemBG, "Text", "Text", () => { item.init(this.defaultItemBG, "Text", "Text", () => {
item.x = this.canvasWidth / 2 - this.itemWidth / 2; item.x = this.canvasWidth / 2 - this.itemWidth / 2;
item.y = this.canvasHeight / 2 - 20; item.y = this.canvasHeight / 2 - 20;
......
This diff is collapsed.
...@@ -466,7 +466,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -466,7 +466,7 @@ export class PlayComponent implements OnInit, OnDestroy {
containerMiddle.ref.addChild(element_middle.ref) containerMiddle.ref.addChild(element_middle.ref)
this.render(containerMiddle.ref) this.render(containerMiddle.ref)
this.initHotZooes(this.g_formData.hotZoneItemArrRight, containerMiddle, "middle") this.initHotZooes(this.g_formData.hotZoneItemArrMiddle, containerMiddle, "middle")
// 右侧 // 右侧
let containerRight = this.g_cartoon.createCartoonElementImageFunc("select-container-right", "bg_330_168", (w, h)=>{ let containerRight = this.g_cartoon.createCartoonElementImageFunc("select-container-right", "bg_330_168", (w, h)=>{
...@@ -513,6 +513,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -513,6 +513,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let element = null let element = null
element = this.g_cartoon.createCartoonElement("image-puzzle-"+index+"_"+side, "MySprite") element = this.g_cartoon.createCartoonElement("image-puzzle-"+index+"_"+side, "MySprite")
console.log(item.media.image_url)
element.ref.init(this.g_cartoon.images.get(item.media.image_url)) element.ref.init(this.g_cartoon.images.get(item.media.image_url))
element.ref.scaleX = (item.rect.width / element.ref.width) * parent.ref.scaleX element.ref.scaleX = (item.rect.width / element.ref.width) * parent.ref.scaleX
element.ref.scaleY = (item.rect.height / element.ref.height) * parent.ref.scaleY element.ref.scaleY = (item.rect.height / element.ref.height) * parent.ref.scaleY
......
src/assets/play/default_itemBG.png

1.7 KB | W: | H:

src/assets/play/default_itemBG.png

2.12 KB | W: | H:

src/assets/play/default_itemBG.png
src/assets/play/default_itemBG.png
src/assets/play/default_itemBG.png
src/assets/play/default_itemBG.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment