Bug Fixed when loading from file

This commit is contained in:
Luis Fernando Molina committed 2019-05-23 21:02:30 +02:00
1 parent fe6750a9b9
commit d9d8b512e5
2 files changed
+5 -2

No files matched your search

+2
View File
@@ -110,6 +110,7 @@ function newStrategyPartTitle () {
}
function physics () {
if (thisObject.payload.title === undefined) { return }
let title = trimTitle(thisObject.payload.title)
const FRAME_HEIGHT = 25
@@ -252,6 +253,7 @@ function newStrategyPartTitle () {
}
function trimTitle (title) {
if (title === undefined) { return }
const MAX_LABEL_LENGTH = 35
if (title.length > MAX_LABEL_LENGTH) {
title = title.substring(0, MAX_LABEL_LENGTH) + '...'