Fix issue #20: Add notes to a map

This commit is contained in:
Gitea OpenCode Agent
2026-10-14 14:46:58 +00:00
parent 9d9738b2b4
commit ba84e10525
16 changed files with 922 additions and 14 deletions

View File

@@ -12,6 +12,13 @@ const MapSchema = new Schema({
offsetY: { type: Number, default: 0 },
// Distance each grid cell stands for (feet, metres...)
scale: { type: Number, min: 0.01, default: 5 },
// Notes pinned onto the map like markers. x/y are image pixels from the top left corner of the
// image, so a pin keeps its place whatever the zoom or the grid settings are.
pins: [{
note: { type: Schema.Types.ObjectId, ref: 'Note', required: true },
x: { type: Number, default: 0 },
y: { type: Number, default: 0 }
}],
campaign: {
type: Schema.Types.ObjectId,
ref: 'Campaign',