2018-05-12 00:01:24 +08:00
|
|
|
import Auth from '/imports/ui/services/auth';
|
2022-06-01 21:47:28 +08:00
|
|
|
import PollService from '/imports/ui/components/poll/service';
|
2022-10-21 22:05:31 +08:00
|
|
|
import { defineMessages } from 'react-intl';
|
|
|
|
import { notify } from '/imports/ui/services/notification';
|
2023-01-06 00:40:03 +08:00
|
|
|
import caseInsensitiveReducer from '/imports/utils/caseInsensitiveReducer';
|
2018-05-12 00:01:24 +08:00
|
|
|
|
2022-10-21 22:05:31 +08:00
|
|
|
const intlMessages = defineMessages({
|
|
|
|
notifyNotAllowedChange: {
|
|
|
|
id: 'app.whiteboard.annotations.notAllowed',
|
|
|
|
description: 'Label shown in toast when the user make a change on a shape he doesnt have permission',
|
|
|
|
},
|
2023-02-03 03:47:16 +08:00
|
|
|
shapeNumberExceeded: {
|
|
|
|
id: 'app.whiteboard.annotations.numberExceeded',
|
|
|
|
description: 'Label shown in toast when the user tries to add more shapes than the limit',
|
|
|
|
},
|
2022-10-21 22:05:31 +08:00
|
|
|
});
|
|
|
|
|
2019-02-14 00:15:09 +08:00
|
|
|
const annotationsQueue = [];
|
2018-05-12 00:01:24 +08:00
|
|
|
// How many packets we need to have to use annotationsBufferTimeMax
|
|
|
|
const annotationsMaxDelayQueueSize = 60;
|
|
|
|
// Minimum bufferTime
|
|
|
|
const annotationsBufferTimeMin = 30;
|
|
|
|
// Maximum bufferTime
|
|
|
|
const annotationsBufferTimeMax = 200;
|
2021-03-25 20:47:57 +08:00
|
|
|
// Time before running 'sendBulkAnnotations' again if user is offline
|
|
|
|
const annotationsRetryDelay = 1000;
|
|
|
|
|
2018-05-12 00:01:24 +08:00
|
|
|
let annotationsSenderIsRunning = false;
|
|
|
|
|
2024-01-24 19:37:51 +08:00
|
|
|
const proccessAnnotationsQueue = async (submitAnnotations) => {
|
2018-05-12 00:01:24 +08:00
|
|
|
annotationsSenderIsRunning = true;
|
|
|
|
const queueSize = annotationsQueue.length;
|
|
|
|
|
|
|
|
if (!queueSize) {
|
|
|
|
annotationsSenderIsRunning = false;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-02-14 00:15:09 +08:00
|
|
|
const annotations = annotationsQueue.splice(0, queueSize);
|
|
|
|
|
2024-01-24 20:18:42 +08:00
|
|
|
try {
|
|
|
|
const isAnnotationSent = await submitAnnotations(annotations);
|
|
|
|
|
|
|
|
if (!isAnnotationSent) {
|
|
|
|
// undo splice
|
|
|
|
annotationsQueue.splice(0, 0, ...annotations);
|
|
|
|
setTimeout(() => proccessAnnotationsQueue(submitAnnotations), annotationsRetryDelay);
|
|
|
|
} else {
|
|
|
|
// ask tiago
|
|
|
|
const delayPerc = Math.min(
|
|
|
|
annotationsMaxDelayQueueSize, queueSize,
|
|
|
|
) / annotationsMaxDelayQueueSize;
|
|
|
|
const delayDelta = annotationsBufferTimeMax - annotationsBufferTimeMin;
|
|
|
|
const delayTime = annotationsBufferTimeMin + delayDelta * delayPerc;
|
|
|
|
setTimeout(() => proccessAnnotationsQueue(submitAnnotations), delayTime);
|
|
|
|
}
|
|
|
|
} catch (error) {
|
2021-03-25 20:47:57 +08:00
|
|
|
annotationsQueue.splice(0, 0, ...annotations);
|
2024-01-24 20:18:42 +08:00
|
|
|
setTimeout(() => proccessAnnotationsQueue(submitAnnotations), annotationsRetryDelay);
|
2021-03-25 20:47:57 +08:00
|
|
|
}
|
2018-05-12 00:01:24 +08:00
|
|
|
};
|
|
|
|
|
2024-01-24 19:37:51 +08:00
|
|
|
const sendAnnotation = (annotation, submitAnnotations) => {
|
2018-06-26 21:28:58 +08:00
|
|
|
// Prevent sending annotations while disconnected
|
2020-04-07 04:34:08 +08:00
|
|
|
// TODO: Change this to add the annotation, but delay the send until we're
|
|
|
|
// reconnected. With this it will miss things
|
2018-06-26 21:28:58 +08:00
|
|
|
if (!Meteor.status().connected) return;
|
|
|
|
|
2023-03-10 19:30:46 +08:00
|
|
|
const index = annotationsQueue.findIndex((ann) => ann.id === annotation.id);
|
2022-09-03 03:26:26 +08:00
|
|
|
if (index !== -1) {
|
|
|
|
annotationsQueue[index] = annotation;
|
|
|
|
} else {
|
|
|
|
annotationsQueue.push(annotation);
|
|
|
|
}
|
2024-01-24 19:37:51 +08:00
|
|
|
if (!annotationsSenderIsRunning) setTimeout(() => proccessAnnotationsQueue(submitAnnotations), annotationsBufferTimeMin);
|
2022-03-09 04:37:37 +08:00
|
|
|
};
|
|
|
|
|
2024-01-24 20:18:42 +08:00
|
|
|
const persistShape = async (shape, whiteboardId, isModerator, submitAnnotations) => {
|
2022-05-04 20:40:56 +08:00
|
|
|
const annotation = {
|
|
|
|
id: shape.id,
|
2023-06-06 04:02:06 +08:00
|
|
|
annotationInfo: { ...shape, isModerator },
|
2022-05-04 20:40:56 +08:00
|
|
|
wbId: whiteboardId,
|
2022-10-21 22:05:31 +08:00
|
|
|
userId: Auth.userID,
|
2022-05-04 20:40:56 +08:00
|
|
|
};
|
|
|
|
|
2024-01-24 19:37:51 +08:00
|
|
|
sendAnnotation(annotation, submitAnnotations);
|
2022-04-05 22:49:13 +08:00
|
|
|
};
|
|
|
|
|
2022-04-26 21:55:05 +08:00
|
|
|
const initDefaultPages = (count = 1) => {
|
2022-04-05 22:49:13 +08:00
|
|
|
const pages = {};
|
|
|
|
const pageStates = {};
|
2023-02-28 00:05:29 +08:00
|
|
|
let i = 0;
|
2022-04-26 21:55:05 +08:00
|
|
|
while (i < count + 1) {
|
2022-04-05 22:49:13 +08:00
|
|
|
pages[`${i}`] = {
|
|
|
|
id: `${i}`,
|
|
|
|
name: `Slide ${i}`,
|
|
|
|
shapes: {},
|
|
|
|
bindings: {},
|
|
|
|
};
|
|
|
|
pageStates[`${i}`] = {
|
|
|
|
id: `${i}`,
|
|
|
|
selectedIds: [],
|
|
|
|
camera: {
|
|
|
|
point: [0, 0],
|
|
|
|
zoom: 1,
|
|
|
|
},
|
|
|
|
};
|
2023-03-10 19:30:46 +08:00
|
|
|
i += 1;
|
2022-04-05 22:49:13 +08:00
|
|
|
}
|
|
|
|
return { pages, pageStates };
|
2021-03-05 06:26:25 +08:00
|
|
|
};
|
|
|
|
|
2022-10-21 22:05:31 +08:00
|
|
|
const notifyNotAllowedChange = (intl) => {
|
|
|
|
if (intl) notify(intl.formatMessage(intlMessages.notifyNotAllowedChange), 'warning', 'whiteboard');
|
|
|
|
};
|
|
|
|
|
2023-02-03 03:47:16 +08:00
|
|
|
const notifyShapeNumberExceeded = (intl, limit) => {
|
|
|
|
if (intl) notify(intl.formatMessage(intlMessages.shapeNumberExceeded, { 0: limit }), 'warning', 'whiteboard');
|
|
|
|
};
|
|
|
|
|
2023-12-06 02:15:25 +08:00
|
|
|
const toggleToolsAnimations = (activeAnim, anim, time, hasWBAccess = false) => {
|
|
|
|
const handleOptionsDropdown = () => {
|
|
|
|
const optionsDropdown = document.getElementById('WhiteboardOptionButton');
|
|
|
|
if (optionsDropdown) {
|
|
|
|
optionsDropdown.classList.remove(activeAnim);
|
|
|
|
optionsDropdown.style.transition = `opacity ${time} ease-in-out`;
|
|
|
|
optionsDropdown.classList.add(anim);
|
|
|
|
}
|
2023-03-27 06:08:09 +08:00
|
|
|
}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
|
|
|
if (hasWBAccess === false) {
|
|
|
|
return handleOptionsDropdown();
|
2023-08-16 22:32:23 +08:00
|
|
|
}
|
2023-03-27 06:08:09 +08:00
|
|
|
|
2023-12-06 02:15:25 +08:00
|
|
|
const checkElementsAndRun = () => {
|
|
|
|
const tlEls = document.querySelectorAll('.tlui-menu-zone, .tlui-toolbar__tools, .tlui-toolbar__extras, .tlui-style-panel__wrapper');
|
|
|
|
if (tlEls.length) {
|
|
|
|
tlEls?.forEach(el => {
|
|
|
|
el.classList.remove(activeAnim);
|
|
|
|
el.style.transition = `opacity ${time} ease-in-out`;
|
|
|
|
el.classList.add(anim);
|
|
|
|
});
|
|
|
|
handleOptionsDropdown();
|
|
|
|
} else {
|
|
|
|
// If the elements are not yet in the DOM, wait for 50ms and try again
|
|
|
|
setTimeout(checkElementsAndRun, 300);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
checkElementsAndRun();
|
|
|
|
};
|
|
|
|
|
2024-02-08 22:05:41 +08:00
|
|
|
const formatAnnotations = (annotations, intl, curPageId, currentPresentationPage) => {
|
2023-09-28 04:42:47 +08:00
|
|
|
const result = {};
|
2023-10-28 00:05:43 +08:00
|
|
|
|
2023-09-28 04:42:47 +08:00
|
|
|
annotations.forEach((annotation) => {
|
2023-10-17 21:49:55 +08:00
|
|
|
if (annotation.annotationInfo === '') return;
|
|
|
|
|
2023-09-28 04:42:47 +08:00
|
|
|
let annotationInfo = JSON.parse(annotation.annotationInfo);
|
|
|
|
|
|
|
|
if (annotationInfo.questionType) {
|
|
|
|
// poll result, convert it to text and create tldraw shape
|
2024-02-08 22:05:41 +08:00
|
|
|
if (!annotationInfo.props) {
|
|
|
|
annotationInfo.answers = annotationInfo.answers.reduce(
|
|
|
|
caseInsensitiveReducer, [],
|
|
|
|
);
|
|
|
|
let pollResult = PollService.getPollResultString(annotationInfo, intl)
|
|
|
|
.split('<br/>').join('\n').replace(/(<([^>]+)>)/ig, '');
|
|
|
|
|
|
|
|
const lines = pollResult.split('\n');
|
|
|
|
const longestLine = lines.reduce((a, b) => (a.length > b.length ? a : b), '').length;
|
|
|
|
|
|
|
|
// Text measurement estimation
|
2024-02-29 21:35:14 +08:00
|
|
|
const averageCharWidth = 14;
|
2024-02-08 22:05:41 +08:00
|
|
|
const lineHeight = 32;
|
2024-06-11 05:12:40 +08:00
|
|
|
const padding = 2;
|
2024-02-08 22:05:41 +08:00
|
|
|
|
2024-06-11 05:12:40 +08:00
|
|
|
const annotationWidth = longestLine * averageCharWidth;
|
|
|
|
const annotationHeight = lines.length * lineHeight;
|
2024-02-08 22:05:41 +08:00
|
|
|
|
|
|
|
const slideWidth = currentPresentationPage?.scaledWidth;
|
|
|
|
const slideHeight = currentPresentationPage?.scaledHeight;
|
2024-06-11 05:12:40 +08:00
|
|
|
const xPosition = slideWidth - annotationWidth - padding;
|
|
|
|
const yPosition = slideHeight - annotationHeight - padding;
|
2024-02-08 22:05:41 +08:00
|
|
|
|
2024-02-09 00:57:20 +08:00
|
|
|
annotationInfo = {
|
|
|
|
x: xPosition,
|
|
|
|
y: yPosition,
|
|
|
|
isLocked: false,
|
|
|
|
rotation: 0,
|
|
|
|
typeName: 'shape',
|
|
|
|
opacity: 1,
|
|
|
|
parentId: `page:${curPageId}`,
|
|
|
|
index: 'a1',
|
|
|
|
id: `${annotationInfo.id}`,
|
|
|
|
meta: {},
|
2024-06-11 05:12:40 +08:00
|
|
|
type: 'poll',
|
2024-02-09 00:57:20 +08:00
|
|
|
props: {
|
|
|
|
color: 'black',
|
|
|
|
fill: 'semi',
|
|
|
|
w: annotationWidth,
|
|
|
|
h: annotationHeight,
|
2024-06-11 05:12:40 +08:00
|
|
|
answers: annotationInfo.answers,
|
|
|
|
numRespondents: annotationInfo.numRespondents,
|
|
|
|
numResponders: annotationInfo.numResponders,
|
|
|
|
questionText: annotationInfo.questionText,
|
|
|
|
questionType: annotationInfo.questionType,
|
|
|
|
question: annotationInfo.question || "",
|
2024-02-09 00:57:20 +08:00
|
|
|
},
|
|
|
|
};
|
|
|
|
} else {
|
|
|
|
annotationInfo = {
|
|
|
|
x: annotationInfo.x,
|
|
|
|
isLocked: annotationInfo.isLocked,
|
|
|
|
y: annotationInfo.y,
|
|
|
|
rotation: annotationInfo.rotation,
|
|
|
|
typeName: annotationInfo.typeName,
|
|
|
|
opacity: annotationInfo.opacity,
|
|
|
|
parentId: annotationInfo.parentId,
|
|
|
|
index: annotationInfo.index,
|
|
|
|
id: annotationInfo.id,
|
|
|
|
meta: annotationInfo.meta,
|
2024-06-11 05:12:40 +08:00
|
|
|
type: 'poll',
|
2024-02-09 00:57:20 +08:00
|
|
|
props: {
|
2024-06-11 05:12:40 +08:00
|
|
|
color: 'black',
|
|
|
|
fill: 'semi',
|
2024-02-09 00:57:20 +08:00
|
|
|
h: annotationInfo.props.h,
|
|
|
|
w: annotationInfo.props.w,
|
2024-06-11 05:12:40 +08:00
|
|
|
answers: annotationInfo.answers,
|
|
|
|
numRespondents: annotationInfo.numRespondents,
|
|
|
|
numResponders: annotationInfo.numResponders,
|
|
|
|
questionText: annotationInfo.questionText,
|
|
|
|
questionType: annotationInfo.questionType,
|
|
|
|
question: annotationInfo.question || '',
|
2024-02-09 00:57:20 +08:00
|
|
|
},
|
2024-02-08 22:05:41 +08:00
|
|
|
};
|
|
|
|
}
|
2023-12-06 02:15:25 +08:00
|
|
|
|
2024-02-08 22:05:41 +08:00
|
|
|
const cpg = parseInt(annotationInfo?.id?.split?.('/')?.[1], 10);
|
|
|
|
if (cpg !== parseInt(curPageId, 10)) return;
|
2023-09-28 04:42:47 +08:00
|
|
|
|
|
|
|
annotationInfo.questionType = false;
|
|
|
|
}
|
|
|
|
result[annotationInfo.id] = annotationInfo;
|
|
|
|
});
|
|
|
|
return result;
|
|
|
|
};
|
|
|
|
|
2024-05-29 21:26:11 +08:00
|
|
|
const getCustomEditorAssetUrls = () => {
|
|
|
|
const BASENAME = window.meetingClientSettings.public.app.basename;
|
|
|
|
const TL_TEXT_PATHS = `${BASENAME}/fonts/tldraw`;
|
|
|
|
|
|
|
|
return {
|
|
|
|
fonts: {
|
|
|
|
draw: `${TL_TEXT_PATHS}/Shantell_Sans-Tldrawish.woff2`,
|
|
|
|
serif: `${TL_TEXT_PATHS}/IBMPlexSerif-Medium.woff2`,
|
|
|
|
sansSerif: `${TL_TEXT_PATHS}/IBMPlexSans-Medium.woff2`,
|
|
|
|
monospace: `${TL_TEXT_PATHS}/IBMPlexMono-Medium.woff2`,
|
|
|
|
},
|
|
|
|
};
|
2024-05-13 21:26:26 +08:00
|
|
|
};
|
2024-05-01 00:40:43 +08:00
|
|
|
|
2024-05-29 21:26:11 +08:00
|
|
|
const getCustomAssetUrls = () => {
|
|
|
|
const BASENAME = window.meetingClientSettings.public.app.basename;
|
|
|
|
const TL_ICON_PATHS = `${BASENAME}/svgs/tldraw`;
|
|
|
|
return {
|
|
|
|
icons: {
|
|
|
|
'menu': `${TL_ICON_PATHS}/menu.svg`,
|
|
|
|
'undo': `${TL_ICON_PATHS}/undo.svg`,
|
|
|
|
'redo': `${TL_ICON_PATHS}/redo.svg`,
|
|
|
|
'trash': `${TL_ICON_PATHS}/trash.svg`,
|
|
|
|
'duplicate': `${TL_ICON_PATHS}/duplicate.svg`,
|
|
|
|
'unlock': `${TL_ICON_PATHS}/unlock.svg`,
|
|
|
|
'arrowhead-none': `${TL_ICON_PATHS}/arrowhead-none.svg`,
|
|
|
|
'arrowhead-arrow': `${TL_ICON_PATHS}/arrowhead-arrow.svg`,
|
|
|
|
'arrowhead-triangle': `${TL_ICON_PATHS}/arrowhead-triangle.svg`,
|
|
|
|
'arrowhead-square': `${TL_ICON_PATHS}/arrowhead-square.svg`,
|
|
|
|
'arrowhead-dot': `${TL_ICON_PATHS}/arrowhead-dot.svg`,
|
|
|
|
'arrowhead-diamond': `${TL_ICON_PATHS}/arrowhead-diamond.svg`,
|
|
|
|
'arrowhead-triangle-inverted': `${TL_ICON_PATHS}/arrowhead-triangle-inverted.svg`,
|
|
|
|
'arrowhead-bar': `${TL_ICON_PATHS}/arrowhead-bar.svg`,
|
|
|
|
'dots-horizontal': `${TL_ICON_PATHS}/dots-horizontal.svg`,
|
|
|
|
'dots-vertical': `${TL_ICON_PATHS}/dots-vertical.svg`,
|
|
|
|
'tool-pointer': `${TL_ICON_PATHS}/tool-pointer.svg`,
|
|
|
|
'tool-media': `${TL_ICON_PATHS}/tool-media.svg`,
|
|
|
|
'tool-hand': `${TL_ICON_PATHS}/tool-hand.svg`,
|
|
|
|
'tool-pencil': `${TL_ICON_PATHS}/tool-pencil.svg`,
|
|
|
|
'tool-eraser': `${TL_ICON_PATHS}/tool-eraser.svg`,
|
|
|
|
'tool-arrow': `${TL_ICON_PATHS}/tool-arrow.svg`,
|
|
|
|
'tool-text': `${TL_ICON_PATHS}/tool-text.svg`,
|
|
|
|
'tool-laser': `${TL_ICON_PATHS}/tool-laser.svg`,
|
|
|
|
'tool-note': `${TL_ICON_PATHS}/tool-note.svg`,
|
|
|
|
'tool-line': `${TL_ICON_PATHS}/tool-line.svg`,
|
|
|
|
'tool-highlight': `${TL_ICON_PATHS}/tool-highlight.svg`,
|
|
|
|
'tool-frame': `${TL_ICON_PATHS}/tool-frame.svg`,
|
|
|
|
'chevron-up': `${TL_ICON_PATHS}/chevron-up.svg`,
|
|
|
|
'chevron-down': `${TL_ICON_PATHS}/chevron-down.svg`,
|
|
|
|
'chevron-right': `${TL_ICON_PATHS}/chevron-right.svg`,
|
|
|
|
'blob': `${TL_ICON_PATHS}/blob.svg`,
|
|
|
|
'geo-rectangle': `${TL_ICON_PATHS}/geo-rectangle.svg`,
|
|
|
|
'geo-ellipse': `${TL_ICON_PATHS}/geo-ellipse.svg`,
|
|
|
|
'geo-diamond': `${TL_ICON_PATHS}/geo-diamond.svg`,
|
|
|
|
'geo-triangle': `${TL_ICON_PATHS}/geo-triangle.svg`,
|
|
|
|
'geo-trapezoid': `${TL_ICON_PATHS}/geo-trapezoid.svg`,
|
|
|
|
'geo-rhombus': `${TL_ICON_PATHS}/geo-rhombus.svg`,
|
|
|
|
'geo-rhombus-2': `${TL_ICON_PATHS}/geo-rhombus-2.svg`,
|
|
|
|
'geo-pentagon': `${TL_ICON_PATHS}/geo-pentagon.svg`,
|
|
|
|
'geo-octagon': `${TL_ICON_PATHS}/geo-octagon.svg`,
|
|
|
|
'geo-hexagon': `${TL_ICON_PATHS}/geo-hexagon.svg`,
|
|
|
|
'geo-cloud': `${TL_ICON_PATHS}/geo-cloud.svg`,
|
|
|
|
'geo-star': `${TL_ICON_PATHS}/geo-star.svg`,
|
|
|
|
'geo-oval': `${TL_ICON_PATHS}/geo-oval.svg`,
|
|
|
|
'geo-x-box': `${TL_ICON_PATHS}/geo-x-box.svg`,
|
|
|
|
'geo-check-box': `${TL_ICON_PATHS}/geo-check-box.svg`,
|
|
|
|
'geo-arrow-left': `${TL_ICON_PATHS}/geo-arrow-left.svg`,
|
|
|
|
'geo-arrow-up': `${TL_ICON_PATHS}/geo-arrow-up.svg`,
|
|
|
|
'geo-arrow-down': `${TL_ICON_PATHS}/geo-arrow-down.svg`,
|
|
|
|
'geo-arrow-right': `${TL_ICON_PATHS}/geo-arrow-right.svg`,
|
|
|
|
'align-left': `${TL_ICON_PATHS}/align-left.svg`,
|
|
|
|
'align-top': `${TL_ICON_PATHS}/align-top.svg`,
|
|
|
|
'align-right': `${TL_ICON_PATHS}/align-right.svg`,
|
|
|
|
'align-center-horizontal': `${TL_ICON_PATHS}/align-center-horizontal.svg`,
|
|
|
|
'align-bottom': `${TL_ICON_PATHS}/align-bottom.svg`,
|
|
|
|
'align-center-vertical': `${TL_ICON_PATHS}/align-center-vertical.svg`,
|
|
|
|
'stretch-vertical': `${TL_ICON_PATHS}/stretch-vertical.svg`,
|
|
|
|
'stretch-horizontal': `${TL_ICON_PATHS}/stretch-horizontal.svg`,
|
|
|
|
'distribute-horizontal': `${TL_ICON_PATHS}/distribute-horizontal.svg`,
|
|
|
|
'distribute-vertical': `${TL_ICON_PATHS}/distribute-vertical.svg`,
|
|
|
|
'stack-horizontal': `${TL_ICON_PATHS}/stack-horizontal.svg`,
|
|
|
|
'stack-vertical': `${TL_ICON_PATHS}/stack-vertical.svg`,
|
|
|
|
'send-to-back': `${TL_ICON_PATHS}/send-to-back.svg`,
|
|
|
|
'send-backward': `${TL_ICON_PATHS}/send-backward.svg`,
|
|
|
|
'bring-forward': `${TL_ICON_PATHS}/bring-forward.svg`,
|
|
|
|
'bring-to-front': `${TL_ICON_PATHS}/bring-to-front.svg`,
|
|
|
|
'reset-zoom': `${TL_ICON_PATHS}/reset-zoom.svg`,
|
|
|
|
'rotate-cw': `${TL_ICON_PATHS}/rotate-cw.svg`,
|
|
|
|
'link': `${TL_ICON_PATHS}/link.svg`,
|
|
|
|
'group': `${TL_ICON_PATHS}/group.svg`,
|
|
|
|
'color': `${TL_ICON_PATHS}/color.svg`,
|
|
|
|
'fill-none': `${TL_ICON_PATHS}/fill-none.svg`,
|
|
|
|
'fill-semi': `${TL_ICON_PATHS}/fill-semi.svg`,
|
|
|
|
'fill-solid': `${TL_ICON_PATHS}/fill-solid.svg`,
|
|
|
|
'fill-pattern': `${TL_ICON_PATHS}/fill-pattern.svg`,
|
|
|
|
'dash-draw': `${TL_ICON_PATHS}/dash-draw.svg`,
|
|
|
|
'dash-dashed': `${TL_ICON_PATHS}/dash-dashed.svg`,
|
|
|
|
'dash-dotted': `${TL_ICON_PATHS}/dash-dotted.svg`,
|
|
|
|
'dash-solid': `${TL_ICON_PATHS}/dash-solid.svg`,
|
|
|
|
'size-small': `${TL_ICON_PATHS}/size-small.svg`,
|
|
|
|
'size-medium': `${TL_ICON_PATHS}/size-medium.svg`,
|
|
|
|
'size-large': `${TL_ICON_PATHS}/size-large.svg`,
|
|
|
|
'size-extra-large': `${TL_ICON_PATHS}/size-extra-large.svg`,
|
|
|
|
'font-draw': `${TL_ICON_PATHS}/font-draw.svg`,
|
|
|
|
'font-sans': `${TL_ICON_PATHS}/font-sans.svg`,
|
|
|
|
'font-serif': `${TL_ICON_PATHS}/font-serif.svg`,
|
|
|
|
'font-mono': `${TL_ICON_PATHS}/font-mono.svg`,
|
|
|
|
'text-align-left': `${TL_ICON_PATHS}/text-align-left.svg`,
|
|
|
|
'text-align-center': `${TL_ICON_PATHS}/text-align-center.svg`,
|
|
|
|
'text-align-right': `${TL_ICON_PATHS}/text-align-right.svg`,
|
|
|
|
'vertical-align-center': `${TL_ICON_PATHS}/vertical-align-center.svg`,
|
|
|
|
'vertical-align-start': `${TL_ICON_PATHS}/vertical-align-start.svg`,
|
|
|
|
'vertical-align-end': `${TL_ICON_PATHS}/vertical-align-end.svg`,
|
|
|
|
},
|
|
|
|
};
|
2024-05-01 00:40:43 +08:00
|
|
|
};
|
|
|
|
|
2023-09-08 01:58:06 +08:00
|
|
|
export {
|
2022-04-05 22:49:13 +08:00
|
|
|
initDefaultPages,
|
2020-04-07 04:34:08 +08:00
|
|
|
sendAnnotation,
|
2022-04-05 22:49:13 +08:00
|
|
|
persistShape,
|
2022-10-21 22:05:31 +08:00
|
|
|
notifyNotAllowedChange,
|
2023-02-03 03:47:16 +08:00
|
|
|
notifyShapeNumberExceeded,
|
2023-03-27 06:08:09 +08:00
|
|
|
toggleToolsAnimations,
|
2023-09-28 04:42:47 +08:00
|
|
|
formatAnnotations,
|
2024-05-29 21:26:11 +08:00
|
|
|
getCustomEditorAssetUrls,
|
|
|
|
getCustomAssetUrls,
|
2024-03-12 20:27:06 +08:00
|
|
|
};
|