diff --git a/src/index.js b/src/index.js index 3d2508c..1c2ed6e 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,4 @@ /* - todo save spinner todo cancelling editing someone's else map return back to it's original address /razminochnyj/ @@ -7,8 +6,6 @@ todo editing map on map list todo setting map public on map list - todo tooltips for panel items - done map catalogue done public maps done map search @@ -24,6 +21,7 @@ todo check canvas support at startup todo check osrm is up + todo tooltips for panel items todo maybe: map preview on save OBLIVION STARTS HERE: diff --git a/src/redux/user/sagas.js b/src/redux/user/sagas.js index 9428344..8b384e2 100644 --- a/src/redux/user/sagas.js +++ b/src/redux/user/sagas.js @@ -321,10 +321,10 @@ function* takeAShotSaga() { timeout: delay(500), }); - // if (cancel) return; if (timeout) yield put(setMode(MODES.SHOT_PREFETCH)); const data = yield (result || worker); + yield put(setMode(MODES.NONE)); yield put(setRenderer({ data, renderer_active: true, width: window.innerWidth, height: window.innerHeight diff --git a/src/utils/renderer.js b/src/utils/renderer.js index e45c706..da7396b 100644 --- a/src/utils/renderer.js +++ b/src/utils/renderer.js @@ -180,7 +180,7 @@ const composeStickerArrow = (ctx, x, y, angle) => { const measureRect = (x, y, width, height, reversed) => ({ rectX: reversed ? (x - width - 36 - 10) : x, - rectY: (y + 3 - 10 - (height / 2)), + rectY: (y - 7 - (height / 2)), rectW: width + 36 + 10, rectH: height + 20, textX: reversed ? (x - width - 36) : x + 36 @@ -217,16 +217,14 @@ const composeStickerText = (ctx, x, y, angle, text) => { line, textX, rectY + 6 + (16 * (i + 1)), - // tX + 36, - // tY + (16 * (i + 1)) - (height / 2) ) )); }; const composeStickerImage = async (ctx, x, y, angle, set, sticker) => { const rad = 56; - const tX = ((Math.cos(angle + Math.PI) * rad) - 30) + x - 8; - const tY = ((Math.sin(angle + Math.PI) * rad) - 30) + y - 4; + const tX = ((Math.cos(angle + Math.PI) * rad) - 30) + (x - 8); + const tY = ((Math.sin(angle + Math.PI) * rad) - 30) + (y - 4); const offsetX = STICKERS[set].layers[sticker].off * 72; return imageFetcher(STICKERS[set].url).then(image => (