|
@@ -1,7 +1,9 @@
|
|
<template>
|
|
<template>
|
|
<template v-for="(track, index) in trackList" :key="index">
|
|
<template v-for="(track, index) in trackList" :key="index">
|
|
<div class="score-container" :style="computeTopAndLeft(track)">
|
|
<div class="score-container" :style="computeTopAndLeft(track)">
|
|
- {{ track.score }}
|
|
|
|
|
|
+ <span class="m-auto">
|
|
|
|
+ {{ track.score }}
|
|
|
|
+ </span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
@@ -40,8 +42,8 @@ export default defineComponent({
|
|
// dy,
|
|
// dy,
|
|
// });
|
|
// });
|
|
return {
|
|
return {
|
|
- top: (topInsideSlice / sliceImage.naturalHeight) * 100 - 2.6 + "%",
|
|
|
|
- left: (leftInsideSlice / sliceImage.naturalWidth) * 100 - 1 + "%",
|
|
|
|
|
|
+ top: (topInsideSlice / sliceImage.naturalHeight) * 100 + "%",
|
|
|
|
+ left: (leftInsideSlice / sliceImage.naturalWidth) * 100 + "%",
|
|
"font-size": store.setting.uiSetting["answer.paper.scale"] * 2.2 + "em",
|
|
"font-size": store.setting.uiSetting["answer.paper.scale"] * 2.2 + "em",
|
|
};
|
|
};
|
|
};
|
|
};
|
|
@@ -56,8 +58,15 @@ export default defineComponent({
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
.score-container {
|
|
.score-container {
|
|
- display: inline-block;
|
|
|
|
position: absolute;
|
|
position: absolute;
|
|
|
|
+ display: flex;
|
|
|
|
+ place-content: center;
|
|
color: red;
|
|
color: red;
|
|
|
|
+
|
|
|
|
+ /* to center score */
|
|
|
|
+ width: 200px;
|
|
|
|
+ height: 200px;
|
|
|
|
+ margin-top: -100px;
|
|
|
|
+ margin-left: -100px;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|