瀏覽代碼

Changing to label instead of title

Kirk Trombley 5 年之前
父節點
當前提交
e14514cf36
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      client/src/components/screens/RoundSummary/useClickToCheckScore.jsx

+ 4 - 1
client/src/components/screens/RoundSummary/useClickToCheckScore.jsx

@@ -5,6 +5,9 @@ export default (mapRef, point1) => {
   // when the map is clicked, call the scoring API and update the marker's title
   useClickMarker(mapRef, async (point2, marker) => {
     const { score } = await checkScore(point1, point2);
-    marker.setTitle(`Potential Score: ${score}`);
+    marker.setLabel({
+      fontWeight: "500",
+      text: `Potential Score: ${score}`
+    });
   });
 }