WIP add in some basic movement MCI codes & color/pipe code cleanup

This commit is contained in:
Bryan Ashby
2018-09-14 20:34:39 -06:00
parent e6055e0f11
commit 9bb3557509
4 changed files with 44 additions and 98 deletions

View File

@@ -37,6 +37,10 @@ MCIViewFactory.UserViewCodes = [
'XY',
];
MCIViewFactory.MovementCodes = [
'CF', 'CB', 'CU', 'CD',
];
MCIViewFactory.prototype.createFromMCI = function(mci) {
assert(mci.code);
assert(mci.id > 0);
@@ -192,14 +196,16 @@ MCIViewFactory.prototype.createFromMCI = function(mci) {
break;
default :
options.text = getPredefinedMCIValue(this.client, mci.code);
if(_.isString(options.text)) {
setWidth(0);
if(!MCIViewFactory.MovementCodes.includes(mci.code)) {
options.text = getPredefinedMCIValue(this.client, mci.code);
if(_.isString(options.text)) {
setWidth(0);
setOption(1, 'textStyle');
setOption(2, 'justify');
setOption(1, 'textStyle');
setOption(2, 'justify');
view = new TextView(options);
view = new TextView(options);
}
}
break;
}