(cleanup)

This commit is contained in:
muerwre 2019-02-06 18:17:13 +07:00
parent c3ed100105
commit e322eef53a
3 changed files with 5 additions and 9 deletions

View file

@ -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:

View file

@ -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

View file

@ -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 => (