mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
(cleanup)
This commit is contained in:
parent
c3ed100105
commit
e322eef53a
3 changed files with 5 additions and 9 deletions
|
@ -1,5 +1,4 @@
|
||||||
/*
|
/*
|
||||||
|
|
||||||
todo save spinner
|
todo save spinner
|
||||||
todo cancelling editing someone's else map return back to it's original address /razminochnyj/
|
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 editing map on map list
|
||||||
todo setting map public on map list
|
todo setting map public on map list
|
||||||
|
|
||||||
todo tooltips for panel items
|
|
||||||
|
|
||||||
done map catalogue
|
done map catalogue
|
||||||
done public maps
|
done public maps
|
||||||
done map search
|
done map search
|
||||||
|
@ -24,6 +21,7 @@
|
||||||
todo check canvas support at startup
|
todo check canvas support at startup
|
||||||
todo check osrm is up
|
todo check osrm is up
|
||||||
|
|
||||||
|
todo tooltips for panel items
|
||||||
todo maybe: map preview on save
|
todo maybe: map preview on save
|
||||||
|
|
||||||
OBLIVION STARTS HERE:
|
OBLIVION STARTS HERE:
|
||||||
|
|
|
@ -321,10 +321,10 @@ function* takeAShotSaga() {
|
||||||
timeout: delay(500),
|
timeout: delay(500),
|
||||||
});
|
});
|
||||||
|
|
||||||
// if (cancel) return;
|
|
||||||
if (timeout) yield put(setMode(MODES.SHOT_PREFETCH));
|
if (timeout) yield put(setMode(MODES.SHOT_PREFETCH));
|
||||||
|
|
||||||
const data = yield (result || worker);
|
const data = yield (result || worker);
|
||||||
|
|
||||||
yield put(setMode(MODES.NONE));
|
yield put(setMode(MODES.NONE));
|
||||||
yield put(setRenderer({
|
yield put(setRenderer({
|
||||||
data, renderer_active: true, width: window.innerWidth, height: window.innerHeight
|
data, renderer_active: true, width: window.innerWidth, height: window.innerHeight
|
||||||
|
|
|
@ -180,7 +180,7 @@ const composeStickerArrow = (ctx, x, y, angle) => {
|
||||||
|
|
||||||
const measureRect = (x, y, width, height, reversed) => ({
|
const measureRect = (x, y, width, height, reversed) => ({
|
||||||
rectX: reversed ? (x - width - 36 - 10) : x,
|
rectX: reversed ? (x - width - 36 - 10) : x,
|
||||||
rectY: (y + 3 - 10 - (height / 2)),
|
rectY: (y - 7 - (height / 2)),
|
||||||
rectW: width + 36 + 10,
|
rectW: width + 36 + 10,
|
||||||
rectH: height + 20,
|
rectH: height + 20,
|
||||||
textX: reversed ? (x - width - 36) : x + 36
|
textX: reversed ? (x - width - 36) : x + 36
|
||||||
|
@ -217,16 +217,14 @@ const composeStickerText = (ctx, x, y, angle, text) => {
|
||||||
line,
|
line,
|
||||||
textX,
|
textX,
|
||||||
rectY + 6 + (16 * (i + 1)),
|
rectY + 6 + (16 * (i + 1)),
|
||||||
// tX + 36,
|
|
||||||
// tY + (16 * (i + 1)) - (height / 2)
|
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
const composeStickerImage = async (ctx, x, y, angle, set, sticker) => {
|
const composeStickerImage = async (ctx, x, y, angle, set, sticker) => {
|
||||||
const rad = 56;
|
const rad = 56;
|
||||||
const tX = ((Math.cos(angle + Math.PI) * rad) - 30) + x - 8;
|
const tX = ((Math.cos(angle + Math.PI) * rad) - 30) + (x - 8);
|
||||||
const tY = ((Math.sin(angle + Math.PI) * rad) - 30) + y - 4;
|
const tY = ((Math.sin(angle + Math.PI) * rad) - 30) + (y - 4);
|
||||||
const offsetX = STICKERS[set].layers[sticker].off * 72;
|
const offsetX = STICKERS[set].layers[sticker].off * 72;
|
||||||
|
|
||||||
return imageFetcher(STICKERS[set].url).then(image => (
|
return imageFetcher(STICKERS[set].url).then(image => (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue