12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- 'use strict';
- define(['jquery', 'underscore', '../lib/@waca/core-client/js/core-client/ui/core/Class'], function ($, _, Class) {
-
- var VisPropertiesCSSProxy = Class.extend({
- init: function init() {
- _.extend(this, arguments[0]);
- this.styleToValue = {
- 'font-weight': 'bold',
- 'font-style': 'italic',
- 'text-decoration': 'underline',
- 'word-break': 'break-all',
- 'white-space': 'initial'
- };
- this.cssPropertyMap = {
- 'Color': 'color',
- 'FontSize': 'font-size',
- 'FontFace': 'font-family',
- 'FontBold': 'font-weight',
- 'FontItalic': 'font-style',
- 'FontUnderline': 'text-decoration',
- 'FontAlign': 'text-align',
- 'TextWrap': ['word-break', 'white-space']
- };
- },
-
- getPropertyStyle: function getPropertyStyle(propName) {
- var prop = this.props ? this.props[propName] : undefined;
- if (prop && prop.style) {
- return this.cssPropertyMap[prop.style];
- }
- }
- });
- return VisPropertiesCSSProxy;
- });
|