Commit ee5b4849 authored by limingzhe's avatar limingzhe

feat: 重新优化调整,增加偏移量,参考物定位

parent 3247a897
......@@ -72,9 +72,15 @@ cc.Class({
},
start() {
console.log(' in start 1 ');
let getData = this.getData.bind(this);
if (window && window.courseware) {
getData = window.courseware.getData;
console.log(' in start 2 ');
}
getData((data) => {
console.log('data:', data);
......@@ -112,7 +118,7 @@ cc.Class({
getDefaultData() {
return {"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/a9429d40fb4cb177dd1ce60904175a0f.png","rect":{"x":524.35,"y":0,"width":287.29,"height":511}},"hotZoneItemArr":[{"id":"1648635493450","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":92.31,"y":80.18,"width":38.69,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/1776b580a3fe788fe4c82a0079b06e59.png"},{"id":"1648635517765","index":1,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":154.31,"y":79.18,"width":38.69,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/1776b580a3fe788fe4c82a0079b06e59.png"},{"id":"1648635528338","index":2,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":212.31,"y":78.18,"width":38.69,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/1776b580a3fe788fe4c82a0079b06e59.png"},{"id":"1648635546224","index":3,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":98.65,"y":209.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635558766","index":4,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":159.65,"y":210.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635573924","index":5,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":217.65,"y":210.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635586383","index":6,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":96.65,"y":279.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635599246","index":7,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":159.65,"y":279.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635607961","index":8,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":217.65,"y":278.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635618898","index":9,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":95.45,"y":348.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635632708","index":10,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":161.45,"y":347.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635644264","index":11,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":218.45,"y":345.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635653495","index":12,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":96.45,"y":416.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635661477","index":13,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":162.45,"y":415.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635671182","index":14,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":222.45,"y":415.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"}],"bgItem2":{"url":"http://staging-teach.cdn.ireadabc.com/a556fdb05346000e3f4cf4ef01a2bb72.png","rect":{"x":229.65,"y":0,"width":1252.69,"height":1769}},"hotZoneItemArr2":[{"id":"1648635704565","index":0,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"0","labelText":"O T t et","posX":538,"posY":75.5,"rect":{"x":167.91,"y":68.58,"width":586.7,"height":54.61}},{"id":"1648635824893","index":1,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"2","labelText":"A","posX":337,"posY":186.5,"rect":{"x":152.67,"y":173.98,"width":106.67,"height":125.72}},{"id":"1648635885959","index":2,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"3","labelText":"Aa","posX":585,"posY":188.5,"rect":{"x":443.48,"y":180.33,"width":154.93,"height":118.1}},{"id":"1648636027065","index":3,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"3","labelText":"Aa","posX":976.5996056164336,"posY":238.38089570719256,"rect":{"x":669.48,"y":179.33,"width":154.93,"height":118.1}},{"id":"1648636034222","index":4,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"3","labelText":"Aa","posX":1207.6004512586155,"posY":240.38089196541299,"rect":{"x":900.49,"y":181.33,"width":154.93,"height":118.1}},{"id":"1648636271394","index":5,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5},"gIdx":"3","labelText":"Bb","posX":753,"posY":774.5,"rect":{"x":448.85,"y":713,"width":149,"height":123}},{"id":"1648636295522","index":6,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":982.0046033900749,"posY":774.5048961185628,"rect":{"x":677.85,"y":713,"width":149,"height":123}},{"id":"1648636301239","index":7,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":1212.0054714829344,"posY":773.504911085681,"rect":{"x":907.86,"y":712,"width":149,"height":123}},{"id":"1648636323106","index":8,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":753.0163321296523,"posY":1044.5028942664946,"rect":{"x":448.87,"y":983,"width":149,"height":123}},{"id":"1648636330998","index":9,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":997.0246146902491,"posY":1043.5039082887572,"rect":{"x":692.87,"y":982,"width":149,"height":123}},{"id":"1648636344007","index":10,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":1225.0255276844632,"posY":1043.5039045469775,"rect":{"x":920.88,"y":982,"width":149,"height":123}},{"id":"1648636351325","index":11,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5},"gIdx":"3","labelText":"Cc","posX":750,"posY":1308.5,"rect":{"x":447.85,"y":1247,"width":145,"height":123}},{"id":"1648636372037","index":12,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":981.0046033900747,"posY":1306.5048961185628,"rect":{"x":678.85,"y":1245,"width":145,"height":123}},{"id":"1648636378367","index":13,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":1208.0054677411547,"posY":1307.504888635004,"rect":{"x":905.86,"y":1246,"width":145,"height":123}},{"id":"1648636383035","index":14,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":757.016317162534,"posY":1577.5048923767833,"rect":{"x":454.87,"y":1516,"width":145,"height":123}},{"id":"1648636389735","index":15,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":995.0246296573673,"posY":1576.5059026572665,"rect":{"x":692.87,"y":1515.01,"width":145,"height":123}},{"id":"1648636397834","index":16,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":1218.025520200904,"posY":1580.5158989529043,"rect":{"x":915.88,"y":1519.02,"width":145,"height":123}}]}
return {"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/a9429d40fb4cb177dd1ce60904175a0f.png","rect":{"x":524.35,"y":0,"width":287.29,"height":511}},"hotZoneItemArr":[{"id":"1648635493450","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":92.31,"y":80.18,"width":38.69,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/1776b580a3fe788fe4c82a0079b06e59.png"},{"id":"1648635517765","index":1,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":154.31,"y":79.18,"width":38.69,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/1776b580a3fe788fe4c82a0079b06e59.png"},{"id":"1648635528338","index":2,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":212.31,"y":78.18,"width":38.69,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/1776b580a3fe788fe4c82a0079b06e59.png"},{"id":"1648635546224","index":3,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":98.65,"y":209.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635558766","index":4,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":159.65,"y":210.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635573924","index":5,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":217.65,"y":210.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635586383","index":6,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":96.65,"y":279.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635599246","index":7,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":159.65,"y":279.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635607961","index":8,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":217.65,"y":278.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635618898","index":9,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":95.45,"y":348.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635632708","index":10,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":161.45,"y":347.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635644264","index":11,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":218.45,"y":345.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635653495","index":12,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":96.45,"y":416.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635661477","index":13,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":162.45,"y":415.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635671182","index":14,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":222.45,"y":415.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"}],"bgItem2":{"url":"http://staging-teach.cdn.ireadabc.com/a556fdb05346000e3f4cf4ef01a2bb72.png","rect":{"x":229.65,"y":0,"width":1252.69,"height":1769}},"hotZoneItemArr2":[{"id":"1648635704565","index":0,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"0","labelText":"T t l","posX":538,"posY":75.5,"rect":{"x":167.91,"y":68.58,"width":586.7,"height":54.61}},{"id":"1648635824893","index":1,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"2","labelText":"A","posX":487.66362551340285,"posY":505.84088620307244,"rect":{"x":144.67,"y":428,"width":226.68,"height":155.68}},{"id":"1648635885959","index":2,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"3","labelText":"Aa","posX":585,"posY":188.5,"rect":{"x":443.48,"y":180.33,"width":154.93,"height":118.1}},{"id":"1648636027065","index":3,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"3","labelText":"Aa","posX":976.5996056164336,"posY":238.38089570719256,"rect":{"x":669.52,"y":179.33,"width":154.93,"height":118.1}},{"id":"1648636034222","index":4,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"3","labelText":"Aa","posX":1207.6004512586155,"posY":240.38089196541299,"rect":{"x":900.53,"y":181.33,"width":154.93,"height":118.1}},{"id":"1648636271394","index":5,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":753,"posY":774.5,"rect":{"x":448.85,"y":713,"width":149,"height":123}},{"id":"1648636295522","index":6,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":982.0046033900749,"posY":774.5048961185628,"rect":{"x":677.89,"y":713,"width":149,"height":123}},{"id":"1648636301239","index":7,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":1212.0054714829344,"posY":773.504911085681,"rect":{"x":907.9,"y":712,"width":149,"height":123}},{"id":"1648636323106","index":8,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":753.0163321296523,"posY":1044.5028942664946,"rect":{"x":448.87,"y":983,"width":149,"height":123}},{"id":"1648636330998","index":9,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":997.0246146902491,"posY":1043.5039082887572,"rect":{"x":692.91,"y":982,"width":149,"height":123}},{"id":"1648636344007","index":10,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":1225.0255276844632,"posY":1043.5039045469775,"rect":{"x":920.92,"y":982,"width":149,"height":123}},{"id":"1648636351325","index":11,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":750,"posY":1308.5,"rect":{"x":447.85,"y":1247,"width":145,"height":123}},{"id":"1648636372037","index":12,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":981.0046033900747,"posY":1306.5048961185628,"rect":{"x":678.89,"y":1245,"width":145,"height":123}},{"id":"1648636378367","index":13,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":1208.0054677411547,"posY":1307.504888635004,"rect":{"x":905.9,"y":1246,"width":145,"height":123}},{"id":"1648636383035","index":14,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":757.016317162534,"posY":1577.5048923767833,"rect":{"x":454.87,"y":1516.04,"width":145,"height":123}},{"id":"1648636389735","index":15,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":995.0246296573673,"posY":1576.5059026572665,"rect":{"x":692.91,"y":1515.05,"width":145,"height":123}},{"id":"1648636397834","index":16,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":1218.025520200904,"posY":1580.5158989529043,"rect":{"x":915.92,"y":1519.06,"width":145,"height":123}}],"isDebug":true}
},
preload() {
......@@ -279,13 +285,13 @@ cc.Class({
const unitH = bottomCenterY - topCenterY;
const unitW = topRect.width;
const baseX = topRect.x;
const baseY = topRect.y + topRect.height / 2;
const baseY = topCenterY;
for(let i=0; i<this.centerItemArr.length; i++) {
const itemRect = this.centerItemArr[i].rect;
const x = itemRect.x + itemRect.width / 2;
const y = itemRect.y - itemRect.height / 2;
const y = itemRect.y + itemRect.height / 2;
const unitX = (x - baseX) / unitW;
const unitY = (y - baseY) / unitH;
......@@ -297,6 +303,9 @@ cc.Class({
this.centerItemArr[i].unitY = unitY;
this.centerItemArr[i].unitW = unitW2;
this.centerItemArr[i].unitH = unitH2;
console.log('unitX: ', unitX)
console.log('unitY: ', unitY)
}
console.log('unitH: ', unitH)
......@@ -304,6 +313,7 @@ cc.Class({
console.log('baseX: ', baseX)
console.log('baseY: ', baseY)
const centerX = this.data.bgItem2.rect.width / 2;
this.centerUnitW = (centerX - baseX) / unitW;
......@@ -463,13 +473,23 @@ cc.Class({
if (this.isCanDraw) {
return;
}
this.isCanDraw = true;
setTimeout(() => {
this.isCanDraw = false;
}, 300);
// this.debugLayer.removeAllChildren();
this.debugDrawLayer.removeAllChildren();
const answerData = this.getAnswerData(data);
......@@ -550,6 +570,8 @@ cc.Class({
return false;
}
this.topLeftLetter = topLeftLetter;
console.log('topLeftLetter: ', topLeftLetter);
return true;
}
......@@ -585,31 +607,207 @@ cc.Class({
getTopLeftLetter(text, block, topLabelData) {
const topItemRect = this.topItemData.rect;
const tempUnitW = topItemRect.width;
const tempUnitH = topItemRect.height;
const tempBaseX = topItemRect.x;
const tempBaseY = topItemRect.y + topItemRect.height / 2;
const firstItemData = this.firstItemData;
console.log('firstItemData: ', firstItemData);
const firstItemRect = this.firstItemData.rect;
const firstItemX = firstItemRect.x + firstItemRect.width / 2;
const firstItemY = firstItemRect.y + firstItemRect.height / 2;
const unitX = (firstItemX - tempBaseX) / tempUnitW;
const unitY = (firstItemY - tempBaseY) / tempUnitH;
const unitW2 = firstItemRect.width / tempUnitW;
const unitH2 = firstItemRect.height / tempUnitH;
console.log('firstItemY: ', firstItemY);
console.log('tempBaseY: ', tempBaseY);
console.log('tempUnitH: ', tempUnitH);
firstItemData.unitX = unitX;
firstItemData.unitY = unitY;
firstItemData.unitW = unitW2;
firstItemData.unitH = unitH2;
// const topLabelData = this.topLabelData;
const firstTopWordLocation = topLabelData.word[0].location;
const lastTopWordLocation = topLabelData.word[topLabelData.word.length - 1].location
const topLocationLeft = firstTopWordLocation.left;
const topLocationTop = firstTopWordLocation.top;
const topLocationRight = lastTopWordLocation.right;
const topLocationBottom = lastTopWordLocation.bottom;
const baseX = topLocationLeft;
const baseY = topLocationTop + (topLocationBottom - topLocationTop) / 2;
const unitW = topLocationRight - topLocationLeft;
const unitH = topLocationBottom - topLocationTop;
const checkLetter = firstItemData;
console.log('baseY: ', baseY);
console.log('checkLetter.unitY: ', checkLetter.unitY);
console.log('unitH: ', unitH);
let x = baseX + checkLetter.unitX * unitW;
const y = baseY + checkLetter.unitY * unitH;
const w = checkLetter.unitW * unitW;
const h = checkLetter.unitH * unitH;
const r = Math.min(w, h) / 2;
// const centerX = baseX + this.centerUnitW * unitW;
// x += (centerX - x) * 0.005 * (y * 0.05);
console.log(' x: ', x);
console.log(' y: ', y);
console.log(' r: ', r);
const dot = this.getColorDot(x, -y, r, 'purple');
this.debugDrawLayer.addChild(dot, 5);
dot.labelText = checkLetter.labelText;
let topLeftLetter;
const wordDataArr = this.getPhotoWordArr(text, block, topLabelData);
let topLeftLetterData;
for (let i=0; i<wordDataArr.length; i++) {
const tempWordArr = wordDataArr[i].word;
for (let k=0; k<tempWordArr.length; k++) {
const {location , content} = tempWordArr[k];
wordDataArr[i].tmpLen = this.getToZeroLen(location)
if (!topLeftLetter) {
topLeftLetter = wordDataArr[i];
} else {
if (topLeftLetter.tmpLen > wordDataArr[i].tmpLen) {
topLeftLetter = wordDataArr[i];
const tempRect = {
x: location.left,
y: -location.bottom,
width: Math.abs( location.right - location.left ),
height: Math.abs( location.bottom - location.top ),
}
const colorRect = this.getColorRect(tempRect);
colorRect.labelText = content;
// this.debugDrawLayer.addChild(colorRect);
const label = this.getLabel(content);
label.x = colorRect.x + colorRect.width / 2 * colorRect.scaleX;
label.y = colorRect.y - colorRect.height / 2 //* colorRect.scaleY;
label.color = cc.Color.GREEN;
// this.debugDrawLayer.addChild(label);
const rect = colorRect.ccRect;
const targetLabelText = colorRect.labelText;
// for (let i=0; i<dotArr.length; i++) {
const {dotRect, labelText} = dot
// const {pos} = dotArr[i];
// if (rect.contains(pos)) {
// console.log('targetLabelText.toLowerCase() : ', targetLabelText.toLowerCase() );
// console.log('labelText.toLowerCase() : ', labelText.toLowerCase() );
// console.log('rect.intersects(dotRect) : ', rect.intersects(dotRect) );
if (targetLabelText.toLowerCase().indexOf(labelText.toLowerCase()) != -1 && rect.intersects(dotRect)) {
topLeftLetterData = wordDataArr[i];
// answerData[i.toString()] = colorRect;
// return;
}
}
}
return topLeftLetter;
return topLeftLetterData;
// const topRect = this.topItemData.rect;
// const topCenterY = (topRect.y + topRect.height / 2);
// const bottomCenterY = (bottomRect.y + bottomRect.height / 2);
// const unitH = bottomCenterY - topCenterY;
// const unitW = topRect.width;
// const baseX = topRect.x;
// const baseY = topRect.y + topRect.height;
// const titleBottom = this.getTitleBottom();
// console.log("titleBottom: ", titleBottom);
// let topLeftLetter;
// const wordDataArr = this.getPhotoWordArr(text, block, topLabelData);
// for (let i=0; i<wordDataArr.length; i++) {
// const tempWordArr = wordDataArr[i].word;
// for (let k=0; k<tempWordArr.length; k++) {
// const {location , content} = tempWordArr[k];
// // console.log('location: ~~ ', location);
// // if (location.top <= titleBottom) {
// // continue;
// // }
// wordDataArr[i].tmpLen = this.getToZeroLen(location)
// if (!topLeftLetter) {
// topLeftLetter = wordDataArr[i];
// } else {
// if (topLeftLetter.tmpLen > wordDataArr[i].tmpLen) {
// topLeftLetter = wordDataArr[i];
// }
// }
// }
// }
// return topLeftLetter;
},
getTitleBottom() {
let maxBottom = 0;
const word = this.topLabelData.word;
for (let i=0; i<word.length; i++) {
if (word[i].location.bottom > maxBottom) {
maxBottom = word[i].location.bottom;
}
}
return maxBottom;
},
getToZeroLen(location) {
......@@ -684,7 +882,7 @@ cc.Class({
const picNode = this.picNodeArr[i];
const key = i.toString();
if (answerData[key]) {
if (answerData[key] && answerData[key].isFinish) {
this.showLetter(picNode);
} else {
......@@ -701,7 +899,7 @@ cc.Class({
// let writeRect = this.writeNodeArr[Number(index)];
picNode.hitCount++;
if (picNode.hitCount < 1) {
if (picNode.hitCount < 2) {
return;
}
......@@ -769,6 +967,8 @@ cc.Class({
console.log(' in getAnswerData: ', block);
const topLabelData = this.topLabelData;
let bottomLabelData ;
if (this.bottomLabelData) {
......@@ -800,6 +1000,10 @@ cc.Class({
console.log(' unitH ~~~ ', unitH);
const scaleRate = this.item.scaleOffY || 0.055;
const postionRate = this.item.positionOffY || 0.4;
const dotArr = [];
for (let i=0; i<this.centerItemArr.length; i++) {
const checkLetter = this.centerItemArr[i];
......@@ -810,19 +1014,31 @@ cc.Class({
const h = checkLetter.unitH * unitH;
const r = Math.min(w, h)
console.log('w: ', w);
console.log('h: ', h);
// console.log('w: ', w);
// console.log('h: ', h);
// console.log('y: ', y);
const centerX = baseX + this.centerUnitW * unitW;
console.log('centerX - x: ', centerX - x);
console.log('y: ', y);
const centerX = baseX + this.centerUnitW * unitW;
x += (centerX - x) * 0.005 * (y * 0.05);
// y -= ( y - (baseY + unitH) ) * 0.35;
const tempR = scaleRate * (checkLetter.unitY * unitH);
const newR = r - tempR;
const rate = newR / r;
const tempY = ( y - (baseY) ) * postionRate;
y = y - tempY * (1 - rate);
const dot = this.getColorDot(x, -y, r);
this.debugDrawLayer.addChild(dot,5);
const tempX = (centerX - x) * postionRate;
x = x + tempX * (1-rate);
const dot = this.getColorDot(x, -y, newR);
this.debugDrawLayer.addChild(dot, 5);
dot.labelText = checkLetter.labelText;
......@@ -839,11 +1055,11 @@ cc.Class({
for (let j=0; j<this.centerItemArr.length; j++) {
const checkLetter = this.centerItemArr[j];
console.log('checkLetter: ', checkLetter);
// console.log('checkLetter: ', checkLetter);
const wordDataArr = this.getPhotoWordArr(checkLetter.labelText, block, topLabelData);
console.log('wordDataArr: ', wordDataArr);
// console.log('wordDataArr: ', wordDataArr);
for (let i=0; i<wordDataArr.length; i++) {
......@@ -896,6 +1112,22 @@ cc.Class({
this.debugDrawLayer.addChild(colorRectTop);
const rectBottom = {
x: bottomLocation.left,
y: -bottomLocation.bottom,
width: Math.abs( bottomLocation.left - bottomLocation.right ),
height: Math.abs( bottomLocation.top - bottomLocation.bottom ),
}
const colorRectBottom = this.getColorRect(rectBottom, 'green');
this.debugDrawLayer.addChild(colorRectBottom);
return answerData;
......@@ -917,8 +1149,22 @@ cc.Class({
const {dotRect, labelText} = dotArr[i];
// const {pos} = dotArr[i];
// if (rect.contains(pos)) {
if (targetLabelText.toLowerCase() == labelText.toLowerCase() && rect.intersects(dotRect)) {
answerData[i.toString()] = colorRect;
console.log('targetLabelText.toLowerCase() : ', targetLabelText.toLowerCase() );
console.log('labelText.toLowerCase() : ', labelText.toLowerCase() );
console.log('rect.intersects(dotRect) : ', rect.intersects(dotRect) );
if (labelText.toLowerCase().indexOf(targetLabelText.toLowerCase()) != -1 && rect.intersects(dotRect)) {
const len = targetLabelText.trim().length;
if (!answerData[i.toString()]) {
answerData[i.toString()] = {colorRect, count: len};
} else {
answerData[i.toString()].count += len;
}
if (answerData[i.toString()].count >= labelText.length) {
answerData[i.toString()].isFinish = true;
}
return;
}
......@@ -949,7 +1195,7 @@ cc.Class({
getColorDot(x, y, r=100) {
getColorDot(x, y, r=100, color='blue') {
const node = new cc.Node();
if (this.debugLayer.parent && this.debugLayer.active) {
......@@ -964,7 +1210,7 @@ cc.Class({
// colorDot.fillColor = cc.Color.BLUE;
// colorDot.fillRect( - r/2, - r/ 2, r, r);
const colorDot = getSprNode('blue');
const colorDot = getSprNode(color);
colorDot.anchorX = 0;
......@@ -1142,6 +1388,10 @@ cc.Class({
layer.parent = cc.find('Canvas');
}
layer.width = this.canvas.width / 2;
layer.height = this.canvas.height / 2;
layer.zIndex = 100;
layer.anchorX = 0;
layer.anchorY = 1;
......@@ -1179,17 +1429,25 @@ cc.Class({
});
layer.x = -this.canvas.width / 2 + 10;
layer.y = this.canvas.height / 2 - 10;
layer.y = this.canvas.height / 2 - this.canvas.height / 3;
layer.opacity = 180;
layer.scale = 2;
// layer.scale = 2;
this.debugLayer = layer;
// const bgRectNode = new cc.Node();
// const ctx = bgRectNode.addComponent(cc.Graphics);
// ctx.fillRect(0, -layer.height, layer.width, layer.height);
// ctx.fillColor = cc.Color.YELLOW.setA(100);
// ctx.fill();
// layer.addChild(bgRectNode);
const drawLayer = new cc.Node();
this.debugDrawLayer = drawLayer;
this.debugLayer.addChild(drawLayer, 2);
this.debugDrawLayer = drawLayer;
},
......@@ -1305,7 +1563,7 @@ cc.Class({
checkCutWordData(wordArr) {
console.log('wordArr: ', wordArr);
// console.log('wordArr: ', wordArr);
let newWordArr = [];
for(let i=0; i<wordArr.length; i++) {
......@@ -1341,13 +1599,13 @@ cc.Class({
}
console.log('newWordArr: ', newWordArr);
// console.log('newWordArr: ', newWordArr);
return newWordArr;
},
getPhotoData(cb) {
const tmpData = {"allText":"Lesson\n2\nAa Bb\nA. Listen and circle, c\n4 4 4 B\nB. Trce and write\nb\nA\nA\nA\nB\nB\nB\na\na\na","block":[{"line":[{"word":[{"content":"Lesson","cornerPoint":[{"x":204,"y":102},{"x":276,"y":102},{"x":276,"y":118},{"x":204,"y":118}],"location":{"bottom":118,"left":204,"right":276,"top":102},"recognizedLanguage":"und"}]},{"word":[{"content":"2","cornerPoint":[{"x":231,"y":121},{"x":248,"y":121},{"x":247,"y":140},{"x":230,"y":140}],"location":{"bottom":140,"left":230,"right":248,"top":121},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"Aa","cornerPoint":[{"x":355,"y":123},{"x":377,"y":122},{"x":377,"y":139},{"x":355,"y":140}],"location":{"bottom":140,"left":355,"right":377,"top":122},"recognizedLanguage":"und"},{"content":"Bb","cornerPoint":[{"x":394,"y":122},{"x":414,"y":121},{"x":414,"y":138},{"x":394,"y":139}],"location":{"bottom":139,"left":394,"right":414,"top":121},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"A.","cornerPoint":[{"x":68,"y":171},{"x":84,"y":170},{"x":84,"y":179},{"x":68,"y":180}],"location":{"bottom":180,"left":68,"right":84,"top":170},"recognizedLanguage":"und"},{"content":"Listen","cornerPoint":[{"x":90,"y":172},{"x":119,"y":170},{"x":119,"y":178},{"x":90,"y":180}],"location":{"bottom":180,"left":90,"right":119,"top":170},"recognizedLanguage":"und"},{"content":"and","cornerPoint":[{"x":124,"y":171},{"x":141,"y":170},{"x":141,"y":177},{"x":124,"y":178}],"location":{"bottom":178,"left":124,"right":141,"top":170},"recognizedLanguage":"und"},{"content":"circle,","cornerPoint":[{"x":146,"y":170},{"x":172,"y":168},{"x":172,"y":176},{"x":146,"y":178}],"location":{"bottom":178,"left":146,"right":172,"top":168},"recognizedLanguage":"und"},{"content":"c","cornerPoint":[{"x":184,"y":166},{"x":191,"y":165},{"x":191,"y":174},{"x":184,"y":175}],"location":{"bottom":175,"left":184,"right":191,"top":165},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"4","cornerPoint":[{"x":64,"y":206},{"x":101,"y":205},{"x":101,"y":227},{"x":64,"y":228}],"location":{"bottom":228,"left":64,"right":101,"top":205},"recognizedLanguage":"und"},{"content":"4","cornerPoint":[{"x":108,"y":206},{"x":155,"y":205},{"x":155,"y":227},{"x":108,"y":228}],"location":{"bottom":228,"left":108,"right":155,"top":205},"recognizedLanguage":"und"},{"content":"4","cornerPoint":[{"x":161,"y":205},{"x":208,"y":204},{"x":208,"y":226},{"x":161,"y":227}],"location":{"bottom":227,"left":161,"right":208,"top":204},"recognizedLanguage":"und"},{"content":"B","cornerPoint":[{"x":215,"y":205},{"x":228,"y":204},{"x":228,"y":226},{"x":215,"y":227}],"location":{"bottom":227,"left":215,"right":228,"top":204},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"B.","cornerPoint":[{"x":98,"y":260},{"x":112,"y":259},{"x":112,"y":266},{"x":98,"y":267}],"location":{"bottom":267,"left":98,"right":112,"top":259},"recognizedLanguage":"und"},{"content":"Trce","cornerPoint":[{"x":117,"y":261},{"x":140,"y":260},{"x":140,"y":266},{"x":117,"y":267}],"location":{"bottom":267,"left":117,"right":140,"top":260},"recognizedLanguage":"und"},{"content":"and","cornerPoint":[{"x":142,"y":258},{"x":158,"y":257},{"x":158,"y":265},{"x":142,"y":266}],"location":{"bottom":266,"left":142,"right":158,"top":257},"recognizedLanguage":"und"},{"content":"write","cornerPoint":[{"x":160,"y":258},{"x":181,"y":257},{"x":181,"y":265},{"x":160,"y":266}],"location":{"bottom":266,"left":160,"right":181,"top":257},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"b","cornerPoint":[{"x":329,"y":274},{"x":339,"y":274},{"x":339,"y":289},{"x":329,"y":289}],"location":{"bottom":289,"left":329,"right":339,"top":274},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"A","cornerPoint":[{"x":128,"y":276},{"x":156,"y":276},{"x":156,"y":295},{"x":128,"y":295}],"location":{"bottom":295,"left":128,"right":156,"top":276},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"A","cornerPoint":[{"x":147,"y":309},{"x":161,"y":308},{"x":161,"y":320},{"x":147,"y":321}],"location":{"bottom":321,"left":147,"right":161,"top":308},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"A","cornerPoint":[{"x":153,"y":334},{"x":166,"y":333},{"x":166,"y":344},{"x":153,"y":345}],"location":{"bottom":345,"left":153,"right":166,"top":333},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"B","cornerPoint":[{"x":269,"y":276},{"x":278,"y":276},{"x":277,"y":289},{"x":268,"y":289}],"location":{"bottom":289,"left":268,"right":278,"top":276},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"B","cornerPoint":[{"x":269,"y":304},{"x":278,"y":304},{"x":277,"y":316},{"x":268,"y":316}],"location":{"bottom":316,"left":268,"right":278,"top":304},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"B","cornerPoint":[{"x":266,"y":330},{"x":279,"y":330},{"x":279,"y":342},{"x":266,"y":342}],"location":{"bottom":342,"left":266,"right":279,"top":330},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"a","cornerPoint":[{"x":200,"y":284},{"x":215,"y":284},{"x":214,"y":291},{"x":199,"y":291}],"location":{"bottom":291,"left":199,"right":215,"top":284},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"a","cornerPoint":[{"x":207,"y":311},{"x":220,"y":311},{"x":219,"y":319},{"x":206,"y":319}],"location":{"bottom":319,"left":206,"right":220,"top":311},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"a","cornerPoint":[{"x":209,"y":337},{"x":220,"y":337},{"x":219,"y":343},{"x":208,"y":343}],"location":{"bottom":343,"left":208,"right":220,"top":337},"recognizedLanguage":"und"}]}]}]}
const tmpData = {"allText":"e-Tnace the lettEr5\nAa Aa\nAa\nB b Bb Bbb\nBb\nCc\nCc","block":[{"line":[{"word":[{"content":"e-Tnace","cornerPoint":[{"x":399,"y":393},{"x":317,"y":395},{"x":316,"y":379},{"x":398,"y":377}],"location":{"bottom":103,"left":81,"right":164,"top":85},"recognizedLanguage":"und"},{"content":"the","cornerPoint":[{"x":313,"y":396},{"x":282,"y":396},{"x":281,"y":380},{"x":312,"y":380}],"location":{"bottom":100,"left":167,"right":199,"top":84},"recognizedLanguage":"und"},{"content":"lettEr5","cornerPoint":[{"x":278,"y":397},{"x":217,"y":398},{"x":216,"y":382},{"x":277,"y":381}],"location":{"bottom":99,"left":202,"right":264,"top":82},"recognizedLanguage":"und"}]}]},{"line":[{"word":[{"content":"Aa","cornerPoint":[{"x":436,"y":362},{"x":349,"y":363},{"x":348,"y":322},{"x":435,"y":321}],"location":{"bottom":159,"left":44,"right":132,"top":117},"recognizedLanguage":"und"}]}]}]}
cb(tmpData);
},
......@@ -2996,6 +3254,7 @@ cc.Class({
hotZoneBg: null,
initHotZoneBg() {
this.hotZoneBg = new cc.Node();
this.hotZoneBg.name = 'hotZoneBg';
this.hotZoneBg.parent = cc.find('Canvas');
this.hotZoneBg.zIndex = 4;
......
......@@ -55,10 +55,27 @@
</div>
<div style="margin-top: 10px; width: 200px; height: 50px; border: 1px solid #ccc ; border-radius: 5px; display: flex; align-items: center; justify-content: center;">
<label nz-checkbox [(ngModel)]="item.isDebug" (ngModelChange)="save()">调试模式</label>
</div>
<div style="margin-top: 20px; margin-bottom: 20px; border: 2px solid #ccc; border-radius: 10px; width: 400px;">
<div style="width: 90%; display:flex; align-items: center; margin: 10px;">
<span style="width: 200px">纵向缩放偏移量:</span><input [disabled]="!item.isDebug" type="text" nz-input [(ngModel)]="item.scaleOffY" (blur)="save()">
</div>
<div style="width: 90%; display:flex; align-items: center; margin: 10px;">
<span style="width: 200px">纵向位置偏移量:</span><input [disabled]="!item.isDebug" type="text" nz-input [(ngModel)]="item.positionOffY" (blur)="save()">
</div>
</div>
</div>
......
......@@ -98,7 +98,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
this.item = data;
}
this.item = {"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/a9429d40fb4cb177dd1ce60904175a0f.png","rect":{"x":524.35,"y":0,"width":287.29,"height":511}},"hotZoneItemArr":[{"id":"1648635493450","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":92.31,"y":80.18,"width":38.69,"height":30.64}},{"id":"1648635517765","index":1,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":154.31,"y":79.18,"width":38.69,"height":30.64}},{"id":"1648635528338","index":2,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":212.31,"y":78.18,"width":38.69,"height":30.64}},{"id":"1648635546224","index":3,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":98.65,"y":209.18,"width":36.01,"height":30.64}},{"id":"1648635558766","index":4,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":159.65,"y":210.18,"width":36.01,"height":30.64}},{"id":"1648635573924","index":5,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":217.65,"y":210.18,"width":36.01,"height":30.64}},{"id":"1648635586383","index":6,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":96.65,"y":279.18,"width":36.01,"height":30.64}},{"id":"1648635599246","index":7,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":159.65,"y":279.18,"width":36.01,"height":30.64}},{"id":"1648635607961","index":8,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":217.65,"y":278.18,"width":36.01,"height":30.64}},{"id":"1648635618898","index":9,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":95.45,"y":348.18,"width":36.39,"height":30.64}},{"id":"1648635632708","index":10,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":161.45,"y":347.18,"width":36.39,"height":30.64}},{"id":"1648635644264","index":11,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":218.45,"y":345.18,"width":36.39,"height":30.64}},{"id":"1648635653495","index":12,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":96.45,"y":416.18,"width":36.39,"height":30.64}},{"id":"1648635661477","index":13,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":162.45,"y":415.18,"width":36.39,"height":30.64}},{"id":"1648635671182","index":14,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":222.45,"y":415.18,"width":36.39,"height":30.64}}],"bgItem2":{"url":"http://staging-teach.cdn.ireadabc.com/a556fdb05346000e3f4cf4ef01a2bb72.png","rect":{"x":174.78,"y":0,"width":986.44,"height":1393}},"hotZoneItemArr2":[{"id":"1648635704565","index":0,"itemType":"rect","fontScale":1.04375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.04375,"dragDot":{"x":668,"y":696.5},"gIdx":"0","labelText":"O T t et","posX":538,"posY":75.5,"rect":{"x":132.22,"y":54,"width":462,"height":43}},{"id":"1648635824893","index":1,"itemType":"rect","fontScale":1.04375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.04375,"dragDot":{"x":668,"y":696.5},"gIdx":"2","labelText":"A","posX":337,"posY":186.5,"rect":{"x":120.22,"y":137,"width":84,"height":99}},{"id":"1648635885959","index":2,"itemType":"rect","fontScale":1.04375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.04375,"dragDot":{"x":668,"y":696.5},"gIdx":"3","labelText":"Aa","posX":585,"posY":188.5,"rect":{"x":349.22,"y":142,"width":122,"height":93}},{"id":"1648635914713","index":3,"itemType":"rect","fontScale":1.04375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.04375,"dragDot":{"x":668,"y":696.5},"gIdx":"3","labelText":"Aa","posX":767,"posY":186.5,"rect":{"x":535.72,"y":130,"width":113,"height":113}}]}
// this.item = {"bgItem":{"url":"http://staging-teach.cdn.ireadabc.com/a9429d40fb4cb177dd1ce60904175a0f.png","rect":{"x":524.35,"y":0,"width":287.29,"height":511}},"hotZoneItemArr":[{"id":"1648635493450","index":0,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":92.31,"y":80.18,"width":38.69,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/1776b580a3fe788fe4c82a0079b06e59.png"},{"id":"1648635517765","index":1,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":154.31,"y":79.18,"width":38.69,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/1776b580a3fe788fe4c82a0079b06e59.png"},{"id":"1648635528338","index":2,"pic_url":"http://staging-teach.cdn.ireadabc.com/fc59b63484be0dbed5c3586a4286b4dc.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":101,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":212.31,"y":78.18,"width":38.69,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/1776b580a3fe788fe4c82a0079b06e59.png"},{"id":"1648635546224","index":3,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":98.65,"y":209.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635558766","index":4,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":159.65,"y":210.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635573924","index":5,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":217.65,"y":210.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635586383","index":6,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":96.65,"y":279.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635599246","index":7,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":159.65,"y":279.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635607961","index":8,"pic_url":"http://staging-teach.cdn.ireadabc.com/dd16f3be1647e448fe6b3e462ca0827c.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":94,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":217.65,"y":278.18,"width":36.01,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/880ae5031927f94a2f853515edfbb035.png"},{"id":"1648635618898","index":9,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":95.45,"y":348.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635632708","index":10,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":161.45,"y":347.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635644264","index":11,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":218.45,"y":345.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635653495","index":12,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":96.45,"y":416.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635661477","index":13,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":162.45,"y":415.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"},{"id":"1648635671182","index":14,"pic_url":"http://staging-teach.cdn.ireadabc.com/00580d68ceabe6628ee7a40574968d39.png","itemType":"pic","fontScale":1.04375,"imgScale":0.3830584707646177,"imgSizeW":95,"imgSizeH":80,"mapScale":1.04375,"dragDot":{"x":668,"y":255.5},"gIdx":"0","rect":{"x":222.45,"y":415.18,"width":36.39,"height":30.64},"answer_pic_url":"http://staging-teach.cdn.ireadabc.com/57c6b2695c8e9568b2c38bbaa04e6365.png"}],"bgItem2":{"url":"http://staging-teach.cdn.ireadabc.com/a556fdb05346000e3f4cf4ef01a2bb72.png","rect":{"x":229.65,"y":0,"width":1252.69,"height":1769}},"hotZoneItemArr2":[{"id":"1648635704565","index":0,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"0","labelText":"O T t et","posX":538,"posY":75.5,"rect":{"x":167.91,"y":68.58,"width":586.7,"height":54.61}},{"id":"1648635824893","index":1,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"2","labelText":"A","posX":337,"posY":186.5,"rect":{"x":152.67,"y":173.98,"width":106.67,"height":125.72}},{"id":"1648635885959","index":2,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"3","labelText":"Aa","posX":585,"posY":188.5,"rect":{"x":443.48,"y":180.33,"width":154.93,"height":118.1}},{"id":"1648636027065","index":3,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"3","labelText":"Aa","posX":976.5996056164336,"posY":238.38089570719256,"rect":{"x":669.48,"y":179.33,"width":154.93,"height":118.1}},{"id":"1648636034222","index":4,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":892.5209580838323},"gIdx":"3","labelText":"Aa","posX":1207.6004512586155,"posY":240.38089196541299,"rect":{"x":900.49,"y":181.33,"width":154.93,"height":118.1}},{"id":"1648636271394","index":5,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5},"gIdx":"3","labelText":"Bb","posX":753,"posY":774.5,"rect":{"x":448.85,"y":713,"width":149,"height":123}},{"id":"1648636295522","index":6,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":982.0046033900749,"posY":774.5048961185628,"rect":{"x":677.85,"y":713,"width":149,"height":123}},{"id":"1648636301239","index":7,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":1212.0054714829344,"posY":773.504911085681,"rect":{"x":907.86,"y":712,"width":149,"height":123}},{"id":"1648636323106","index":8,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":753.0163321296523,"posY":1044.5028942664946,"rect":{"x":448.87,"y":983,"width":149,"height":123}},{"id":"1648636330998","index":9,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":997.0246146902491,"posY":1043.5039082887572,"rect":{"x":692.87,"y":982,"width":149,"height":123}},{"id":"1648636344007","index":10,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Bb","posX":1225.0255276844632,"posY":1043.5039045469775,"rect":{"x":920.88,"y":982,"width":149,"height":123}},{"id":"1648636351325","index":11,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5},"gIdx":"3","labelText":"Cc","posX":750,"posY":1308.5,"rect":{"x":447.85,"y":1247,"width":145,"height":123}},{"id":"1648636372037","index":12,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":981.0046033900747,"posY":1306.5048961185628,"rect":{"x":678.85,"y":1245,"width":145,"height":123}},{"id":"1648636378367","index":13,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":1208.0054677411547,"posY":1307.504888635004,"rect":{"x":905.86,"y":1246,"width":145,"height":123}},{"id":"1648636383035","index":14,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":757.016317162534,"posY":1577.5048923767833,"rect":{"x":454.87,"y":1516,"width":145,"height":123}},{"id":"1648636389735","index":15,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":995.0246296573673,"posY":1576.5059026572665,"rect":{"x":692.87,"y":1515.01,"width":145,"height":123}},{"id":"1648636397834","index":16,"itemType":"rect","fontScale":1.3375,"imgScale":1,"imgSizeW":0,"imgSizeH":0,"mapScale":1.3375,"dragDot":{"x":856,"y":884.5000000000001},"gIdx":"3","labelText":"Cc","posX":1218.025520200904,"posY":1580.5158989529043,"rect":{"x":915.88,"y":1519.02,"width":145,"height":123}}]}
console.log('this.item: ', this.item);
......@@ -123,7 +123,13 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy, AfterViewIni
init() {
if (!this.item.scaleOffY) {
this.item.scaleOffY = 0.055;
}
if (!this.item.positionOffY) {
this.item.positionOffY = 0.4;
}
}
......
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