Added note menu and note text

This commit is contained in:
Mitchell McCaffrey
2020-11-04 15:03:34 +11:00
parent 927c596b04
commit a3ae3471e8
5 changed files with 411 additions and 40 deletions
+4 -4
View File
@@ -167,7 +167,7 @@ function NetworkedMapAndTokens({ session }) {
session.send("mapFogIndex", index);
}
function handleNoteAdd(note) {
function handleNoteChange(note) {
setCurrentMapState((prevMapState) => ({
...prevMapState,
notes: {
@@ -175,7 +175,7 @@ function NetworkedMapAndTokens({ session }) {
[note.id]: note,
},
}));
session.send("mapNoteAdd", note);
session.send("mapNoteChange", note);
}
/**
@@ -406,7 +406,7 @@ function NetworkedMapAndTokens({ session }) {
fogDrawActionIndex: data,
}));
}
if (id === "mapNoteAdd" && currentMapState) {
if (id === "mapNoteChange" && currentMapState) {
setCurrentMapState((prevMapState) => ({
...prevMapState,
notes: {
@@ -480,7 +480,7 @@ function NetworkedMapAndTokens({ session }) {
onFogDraw={handleFogDraw}
onFogDrawUndo={handleFogDrawUndo}
onFogDrawRedo={handleFogDrawRedo}
onMapNoteAdd={handleNoteAdd}
onMapNoteChange={handleNoteChange}
allowMapDrawing={canEditMapDrawing}
allowFogDrawing={canEditFogDrawing}
allowMapChange={canChangeMap}