Browse Source

修改轨迹分与特殊标记在评卷界面的默认显示大小

luoshi 4 năm trước cách đây
mục cha
commit
607da1a006

+ 1 - 1
stmms-web/src/main/webapp/static/mark-new/js/modules/single-image-view.js

@@ -154,7 +154,7 @@ SingleImageView.prototype.reloadImage = function (scaleAddon) {
 
 SingleImageView.prototype.drawTag = function (tag) {
     if (tag != undefined && tag.positionX > 0 && tag.positionY > 0 && this.image != undefined) {
-        this.ctx.font = parseInt(60 * this.scale) + "px Arial";
+        this.ctx.font = parseInt(30 * this.scale) + "px Arial";
         this.ctx.fillStyle = 'red';
         this.ctx.fillText(tag.content, tag.positionX * this.canvas.width, tag.positionY * this.canvas.height);
     }

+ 5 - 5
stmms-web/src/main/webapp/static/mark-track/js/modules/single-image-view.js

@@ -46,7 +46,7 @@ function SingleImageView(option) {
 SingleImageView.prototype.init = function () {
     var self = this;
     this.container = getDom(this.container_dom, this.markControl).appendTo(this.markControl.container.centerContent);
-    this.container.height(this.markControl.container.centerContent.height()-20);
+    this.container.height(this.markControl.container.centerContent.height() - 20);
     //this.container.perfectScrollbar({
     //    wheelSpeed: 20
     //});
@@ -59,11 +59,11 @@ SingleImageView.prototype.init = function () {
 
     $(this.canvas).click(function (event) {
         if (self.task != undefined) {
-        	let scale = self.image.width / self.canvas.width
+            let scale = self.image.width / self.canvas.width
             let left = event.pageX - $(self.canvas).offset().left
             let top = event.pageY - $(self.canvas).offset().top
-            let offsetX = left*scale
-            let offsetY = top*scale
+            let offsetX = left * scale
+            let offsetY = top * scale
             let offsetIndex = 1
             for (let i = 0; i < self.task.imageLayout.length; i++) {
                 let layout = self.task.imageLayout[i]
@@ -140,7 +140,7 @@ SingleImageView.prototype.reloadImage = function (scaleAddon) {
 
 SingleImageView.prototype.drawTag = function (tag) {
     if (tag != undefined && tag.positionX > 0 && tag.positionY > 0 && this.image != undefined) {
-        this.ctx.font = parseInt(60 * this.scale) + "px Arial";
+        this.ctx.font = parseInt(30 * this.scale) + "px Arial";
         this.ctx.fillStyle = 'red';
         this.ctx.fillText(tag.content, tag.positionX * this.canvas.width, tag.positionY * this.canvas.height);
     }