chore: rename variable per comments

This commit is contained in:
Martin Guillon
2021-01-05 16:11:04 +01:00
parent 7f31cb3d95
commit 0ef4a37c3b
5 changed files with 8 additions and 8 deletions

View File

@ -131,7 +131,7 @@ declare namespace NodeJS {
declare const __DEV__: string;
declare const __CSS_PARSER__: string;
declare const __NS_WEBPACK__: boolean;
declare const __UI_CUSTOM_FLAVOR__: boolean;
declare const __UI_USE_EXTERNAL_RENDERER__: boolean;
declare const __UI_USE_XML_PARSER__: boolean;
declare const __ANDROID__: boolean;
declare const __IOS__: boolean;

View File

@ -344,7 +344,7 @@ export class Binding {
}
let newValue = value;
if (__UI_CUSTOM_FLAVOR__) {
if (__UI_USE_EXTERNAL_RENDERER__) {
} else if (this.options.expression) {
const changedModel = {};
changedModel[bc.bindingValueKey] = value;
@ -376,7 +376,7 @@ export class Binding {
}
private _getExpressionValue(expression: string, isBackConvert: boolean, changedModel: any): any {
if (!__UI_CUSTOM_FLAVOR__) {
if (!__UI_USE_EXTERNAL_RENDERER__) {
try {
const exp = PolymerExpressions.getExpression(expression);
if (exp) {
@ -426,7 +426,7 @@ export class Binding {
}
}
if (__UI_CUSTOM_FLAVOR__ || !this.options.expression) {
if (__UI_USE_EXTERNAL_RENDERER__ || !this.options.expression) {
if (changedPropertyIndex > -1) {
const props = sourceProps.slice(changedPropertyIndex + 1);
const propsLength = props.length;
@ -521,7 +521,7 @@ export class Binding {
}
private getSourcePropertyValue() {
if (__UI_CUSTOM_FLAVOR__) {
if (__UI_USE_EXTERNAL_RENDERER__) {
} else if (this.options.expression) {
const changedModel = {};
changedModel[bc.bindingValueKey] = this.source ? this.source.get() : undefined;

View File

@ -26,7 +26,7 @@ export abstract class ListViewBase extends ContainerView implements ListViewDefi
public _defaultTemplate: KeyedTemplate = {
key: 'default',
createView: () => {
if (__UI_CUSTOM_FLAVOR__) {
if (__UI_USE_EXTERNAL_RENDERER__) {
} else if (this.itemTemplate) {
return Builder.parse(this.itemTemplate, this);
}

View File

@ -129,7 +129,7 @@ export class Repeater extends CustomLayoutView {
}
if (!viewToAdd) {
if (__UI_CUSTOM_FLAVOR__) {
if (__UI_USE_EXTERNAL_RENDERER__) {
viewToAdd = this._getDefaultItemContent(i)
} else {
viewToAdd = this.itemTemplate ? Builder.parse(this.itemTemplate, this) : this._getDefaultItemContent(i);

View File

@ -243,7 +243,7 @@ export default function (config: Config, env: IWebpackEnv): Config {
__DEV__: mode === 'development',
__NS_WEBPACK__: true,
__UI_USE_XML_PARSER__: true,
__UI_CUSTOM_FLAVOR__: projectUsesCustomFlavor(),
__UI_USE_EXTERNAL_RENDERER__: projectUsesCustomFlavor(),
__CSS_PARSER__: JSON.stringify(getValue('cssParser')), // todo: replace from config value
__ANDROID__: platform === 'android',
__IOS__: platform === 'ios',