bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/whiteboard/custom-shapes/poll/poll-shape-migrations.ts
KDSBrowne 3bfdeb9cfd
feat(whiteboard): Reuse poll result diagram as a whiteboard shape (#20350)
* create poll shape to render chat poll component
2024-06-10 17:12:40 -04:00

26 lines
680 B
TypeScript

// @ts-nocheck
import { defineMigrations } from '@bigbluebutton/tldraw';
// Migrations for the custom poll shape (optional but very helpful)
export const pollShapeMigrations = defineMigrations({
currentVersion: 1,
migrators: {
1: {
// example, removing a property from the shape
up(shape) {
const migratedUpShape = { ...shape };
delete migratedUpShape.somePropertyToRemove;
return migratedUpShape;
},
down(shape) {
const migratedDownShape = { ...shape };
migratedDownShape.somePropertyToRemove = 'some value';
return migratedDownShape;
},
},
},
});
export default pollShapeMigrations;