Commit 220e54ef authored by 李维's avatar 李维

dev done

parent 78674512
......@@ -204,9 +204,8 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
item.audio_url = saveData.media.audio_url?saveData.media.audio_url:""
} else {
item.uid = uuid.v4()
console.log(item.uid)
item.initFont(Number(this.fontSize) * this.scale, this.fontName, this.fontColor)
item.init(this.defaultItemBG, "TextText", "Text", () => {
item.init(this.defaultItemBG, "Text", "Text", () => {
item.x = this.canvasWidth / 2 - this.itemWidth / 2;
item.y = this.canvasHeight / 2 - 20;
return {width: this.itemWidth, height: this.itemHeight}
......
This diff is collapsed.
......@@ -101,6 +101,8 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
handleTextChange(e, uid) {
this.hotZooLeftEL.setTextByUID(e.target.value, uid)
this.hotZooMiddleEL.setTextByUID(e.target.value, uid)
this.hotZooRightEL.setTextByUID(e.target.value, uid)
this.save()
}
......@@ -265,7 +267,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
item.combin = item.combin.splice(0, Number(item.number))
}
this.save()
console.log(item.combin)
}
deleteQuestionItem(pos, i) {
......@@ -308,7 +309,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
}
onAudioUploadSuccess(e, key, item?) {
console.log(key, item)
if(item) {
item[key] = e.url;
} else {
......@@ -321,7 +321,6 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
fields.forEach((name: any)=>{
to[name] = from[name]
})
console.log(from, to)
}
save() {
......
This diff is collapsed.
......@@ -30,9 +30,12 @@ const localImages = {
"defalut_container": "assets/play/bg_320_168.png",
"part_number_bg": "assets/play/part_number_bg.png",
'bg_70_40': 'assets/play/bg_70_40.png',
'bg_num': 'assets/play/bg_num.png',
'bg_250_46': 'assets/play/bg_250_46.png',
'bg_375_46': 'assets/play/bg_375_46.png',
'bg_50_20': 'assets/play/bg_50_20.png',
'bg_330_168': 'assets/play/bg_330_168.png',
'bg_300_46': 'assets/play/bg_300_46.png',
'demo': 'assets/play/demo.png',
'line': 'assets/play/line.png',
'num-1': 'assets/play/num-1.png',
......
......@@ -70,48 +70,303 @@ export const demoData = {
mainText: "Listen, circle and write.",
mainTextAudio_url: "",
},
wordLeft_text: "",
wordLeft_text: "ear",
wordLeft_audio_url: "",
hotZoneItemArrLeft: [],
questionsLeft: [],
hotZoneItemArrLeft: [
{
index: 0,
rect: {
x: 11.870388349514563,
y: -38.60859029126214,
width: 60.87378640776699,
height: 26.175728155339808,
},
uid: "2ea9d699-a27a-4316-b67f-911ea7f79ce6",
media: {
image_url: "assets/play/default_itemBG.png",
text: "d",
type: "Text",
audio_url: "",
},
scale: 0.6087378640776699,
},
{
index: 1,
rect: {
x: 16.131553398058255,
y: 72.18170097087379,
width: 60.87378640776699,
height: 26.175728155339808,
},
uid: "eab8f3d6-9cbc-4956-b240-c858b2678476",
media: {
image_url: "assets/play/default_itemBG.png",
text: "mi",
type: "Text",
audio_url: "",
},
scale: 0.6087378640776699,
},
{
index: 2,
rect: {
x: 117.18203883495147,
y: 21.047720388349518,
width: 60.87378640776699,
height: 26.175728155339808,
},
uid: "aa2310bc-ff1c-4c8e-b2f6-e884ecdddf88",
media: {
image_url: "assets/play/default_itemBG.png",
text: "p",
type: "Text",
audio_url: "",
},
scale: 0.6087378640776699,
},
{
index: 3,
rect: {
x: 235.88592233009712,
y: -37.99985242718447,
width: 60.87378640776699,
height: 26.175728155339808,
},
uid: "5a91f31e-9e37-4d7c-a6e6-255c8e2dd1df",
media: {
image_url: "assets/play/default_itemBG.png",
text: "w",
type: "Text",
audio_url: "",
},
scale: 0.6087378640776699,
},
{
index: 4,
rect: {
x: 232.23349514563108,
y: 69.13801165048544,
width: 60.87378640776699,
height: 26.175728155339808,
},
uid: "a4bdec5b-3659-4f70-bdf0-5a7029e73c67",
media: {
image_url: "assets/play/default_itemBG.png",
text: "go",
type: "Text",
audio_url: "",
},
scale: 0.6087378640776699,
},
],
questionsLeft: [
{ number: 2, combin: [0, -1], _combin: [0, -1] },
{ number: 2, combin: [0, -1], _combin: [0, -1] },
{ number: 2, combin: [0, -1], _combin: [0, -1] },
],
bgItemLeft: {
url: "assets/play/hotZooCard/defalut_bg.png",
rect: {
x: 0,
y: 0,
width: 1315,
height: 212.31770833333334,
},
rect: { x: 0, y: 89.51538825757572, width: 515, height: 83.15104166666667 },
questions: [],
},
wordMiddle_text: "",
wordMiddle_text: "ear",
wordMiddle_audio_url: "",
hotZoneItemArrMiddle: [],
questionsMiddle: [],
hotZoneItemArrMiddle: [
{
index: 0,
rect: {
x: 17.416666666666668,
y: -27.247,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "bffbcc62-44bf-4336-b9a2-28b9c57a23dd",
media: {
image_url: "assets/play/default_itemBG.png",
text: "d",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
{
index: 1,
rect: {
x: 13.750000000000002,
y: 69.91966666666667,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "7a9a60fd-da42-4adc-92b2-ea44144e3c85",
media: {
image_url: "assets/play/default_itemBG.png",
text: "mi",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
{
index: 2,
rect: {
x: 121.91666666666667,
y: 18.586333333333336,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "33260665-7cbb-4d66-b50f-35cb27bb232e",
media: {
image_url: "assets/play/default_itemBG.png",
text: "p",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
{
index: 3,
rect: {
x: 235.58333333333334,
y: -27.858111111111114,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "6691ef34-6d56-4704-9fc0-945bf929e4d6",
media: {
image_url: "assets/play/default_itemBG.png",
text: "w",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
{
index: 4,
rect: {
x: 230.69444444444446,
y: 63.19744444444445,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "e8a50b81-cdca-40fd-886d-2a07e6263c9d",
media: {
image_url: "assets/play/default_itemBG.png",
text: "go",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
],
questionsMiddle: [
{ number: 2, combin: [2, -1], _combin: [2, -1] },
{ number: 2, combin: [2, -1], _combin: [2, -1] },
{ number: 2, combin: [2, -1], _combin: [2, -1] },
],
bgItemMiddle: {
url: "assets/play/hotZooCard/defalut_bg.png",
rect: {
x: 0,
y: 0,
width: 1315,
height: 212.31770833333334,
},
rect: { x: 0, y: 89.16775568181816, width: 513, height: 82.828125 },
questions: [],
},
wordRight_text: "",
wordRight_text: "ear",
wordRight_audio_url: "",
hotZoneItemArrRight: [],
questionsRight: [],
hotZoneItemArrRight: [
{
index: 0,
rect: {
x: 18.63888888888889,
y: -24.191444444444446,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "b7943632-7a5b-4ada-b640-81b758712a61",
media: {
image_url: "assets/play/default_itemBG.png",
text: "d",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
{
index: 1,
rect: {
x: 16.805555555555557,
y: 69.91966666666667,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "54e395b1-5d90-4f4b-afe4-dacea3711fad",
media: {
image_url: "assets/play/default_itemBG.png",
text: "mi",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
{
index: 2,
rect: {
x: 126.19444444444446,
y: 19.197444444444447,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "2669a94f-b66d-483a-9a49-a71042ad7e02",
media: {
image_url: "assets/play/default_itemBG.png",
text: "p",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
{
index: 3,
rect: {
x: 233.75000000000003,
y: -22.35811111111111,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "6a6fcbc7-84e9-4cad-b380-d78e74a24c33",
media: {
image_url: "assets/play/default_itemBG.png",
text: "w",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
{
index: 4,
rect: {
x: 233.75000000000003,
y: 68.08633333333334,
width: 61.111111111111114,
height: 26.27777777777778,
},
uid: "41165693-b5ca-4b7d-b7db-6f643259dac6",
media: {
image_url: "assets/play/default_itemBG.png",
text: "go",
type: "Text",
audio_url: "",
},
scale: 0.6111111111111112,
},
],
questionsRight: [
{ number: 2, combin: [3, -1], _combin: [3, -1] },
{ number: 2, combin: [3, -1], _combin: [3, -1] },
{ number: 2, combin: [3, -1], _combin: [3, -1] },
],
bgItemRight: {
url: "assets/play/hotZooCard/defalut_bg.png",
rect: {
x: 0,
y: 0,
width: 1315,
height: 212.31770833333334,
},
rect: { x: 0, y: 89.16775568181816, width: 513, height: 82.828125 },
questions: [],
},
bgImages: {
leftTop: "",
middleTop: "",
......@@ -121,5 +376,5 @@ export const demoData = {
leftBottom: "",
middleBottom: "",
rightBottom: "",
}
},
};
src/assets/play/bg_330_168.png

2.12 KB | W: | H:

src/assets/play/bg_330_168.png

2.32 KB | W: | H:

src/assets/play/bg_330_168.png
src/assets/play/bg_330_168.png
src/assets/play/bg_330_168.png
src/assets/play/bg_330_168.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/play/line.png

113 Bytes | W: | H:

src/assets/play/line.png

108 Bytes | W: | H:

src/assets/play/line.png
src/assets/play/line.png
src/assets/play/line.png
src/assets/play/line.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