| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -120,7 +120,7 @@ function _test_onLiveSync_ModuleContext_TypeStyle(context: { type, path }) { | |||
| 120 | 120 | helper.navigateWithHistory(() => page); | |
| 121 | 121 | ||
| 122 | 122 | const pageBeforeLiveSync = helper.getCurrentPage(); | |
| 123 | - pageBeforeLiveSync._rootOfModule = "main-page"; | ||
| 123 | + pageBeforeLiveSync._moduleName = "main-page"; | ||
| 124 | 124 | global.__onLiveSync({ type: context.type, path: context.path }); | |
| 125 | 125 | ||
| 126 | 126 | const pageAfterLiveSync = helper.getCurrentPage(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,13 +14,13 @@ function getViewComponent() { | |||
| 14 | 14 | ||
| 15 | 15 | export function test_view_is_module_root_component() { | |
| 16 | 16 | const view = getViewComponent(); | |
| 17 | - const actualModule = view._rootOfModule; | ||
| 17 | + const actualModule = view._moduleName; | ||
| 18 | 18 | assertEqual(actualModule, COMPONENT_MODULE, `View<${view}> is NOT root component of module <${COMPONENT_MODULE}>.`); | |
| 19 | 19 | } | |
| 20 | 20 | ||
| 21 | 21 | export function test_view_is_NOT_module_root_component() { | |
| 22 | 22 | const view = getViewComponent(); | |
| 23 | 23 | const nestedView = view.getViewById(`${LABEL}`); | |
| 24 | - const undefinedModule = nestedView._rootOfModule; | ||
| 24 | + const undefinedModule = nestedView._moduleName; | ||
| 25 | 25 | assertNull(undefinedModule, `View<${nestedView}> should NOT be a root component of a module.`); | |
| 26 | 26 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -60,7 +60,7 @@ export function load(pathOrOptions: string | LoadOptions, context?: any): View { | |||
| 60 | 60 | export function loadPage(moduleNamePath: string, fileName: string, context?: any): View { | |
| 61 | 61 | const componentModule = loadInternal(fileName, context, moduleNamePath); | |
| 62 | 62 | const componentView = componentModule && componentModule.component; | |
| 63 | - setRootOfModule(componentView, moduleNamePath); | ||
| 63 | + markAsModuleRoot(componentView, moduleNamePath); | ||
| 64 | 64 | return componentView; | |
| 65 | 65 | } | |
| 66 | 66 | ||
@@ -138,10 +138,10 @@ const moduleCreateView = profile("module.createView", (moduleNamePath: string, m | |||
| 138 | 138 | return view; | |
| 139 | 139 | }); | |
| 140 | 140 | ||
| 141 | - function setRootOfModule(componentView: View, moduleNamePath: string): void { | ||
| 141 | + function markAsModuleRoot(componentView: View, moduleNamePath: string): void { | ||
| 142 | 142 | const lastIndexOfSeparator = moduleNamePath.lastIndexOf(path.separator); | |
| 143 | 143 | const moduleName = moduleNamePath.substring(lastIndexOfSeparator + 1); | |
| 144 | - componentView._rootOfModule = moduleName; | ||
| 144 | + componentView._moduleName = moduleName; | ||
| 145 | 145 | } | |
| 146 | 146 | ||
| 147 | 147 | function loadInternal(fileName: string, context?: any, moduleNamePath?: string): ComponentModule { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -112,7 +112,7 @@ export abstract class ViewBase extends Observable { | |||
| 112 | 112 | * @private | |
| 113 | 113 | * Module name when the view is a module root. Otherwise, it is undefined. | |
| 114 | 114 | */ | |
| 115 | - _rootOfModule?: string; | ||
| 115 | + _moduleName?: string; | ||
| 116 | 116 | ||
| 117 | 117 | //@private | |
| 118 | 118 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -244,7 +244,7 @@ export abstract class ViewBase extends Observable implements ViewBaseDefinition | |||
| 244 | 244 | public _defaultPaddingLeft: number; | |
| 245 | 245 | public _isPaddingRelative: boolean; | |
| 246 | 246 | ||
| 247 | - public _rootOfModule: string; | ||
| 247 | + public _moduleName: string; | ||
| 248 | 248 | ||
| 249 | 249 | constructor() { | |
| 250 | 250 | super(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,11 +5,10 @@ import { | |||
| 5 | 5 | } from "."; | |
| 6 | 6 | ||
| 7 | 7 | import { | |
| 8 | - ViewBase, Property, booleanConverter, EventData, layout, | ||
| 8 | + ViewBase, Property, booleanConverter, eachDescendant, EventData, layout, | ||
| 9 | 9 | getEventOrGestureName, traceEnabled, traceWrite, traceCategories, | |
| 10 | 10 | InheritedProperty, | |
| 11 | - ShowModalOptions, | ||
| 12 | - eachDescendant | ||
| 11 | + ShowModalOptions | ||
| 13 | 12 | } from "../view-base"; | |
| 14 | 13 | ||
| 15 | 14 | import { HorizontalAlignment, VerticalAlignment, Visibility, Length, PercentLength } from "../../styling/style-properties"; | |
@@ -156,11 +155,12 @@ export abstract class ViewCommon extends ViewBase implements ViewDefinition { | |||
| 156 | 155 | return true; | |
| 157 | 156 | }); | |
| 158 | 157 | } | |
| 158 | + // Do not execute frame navigation for a change in styles | ||
| 159 | 159 | return true; | |
| 160 | 160 | } | |
| 161 | 161 | ||
| 162 | 162 | private changeStyles(view: ViewBase, contextPath: string): boolean { | |
| 163 | - if (view._rootOfModule && contextPath.includes(view._rootOfModule)) { | ||
| 163 | + if (view._moduleName && contextPath.includes(view._moduleName)) { | ||
| 164 | 164 | (<this>view).changeCssFile(contextPath); | |
| 165 | 165 | return true; | |
| 166 | 166 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -720,12 +720,6 @@ export abstract class View extends ViewBase { | |||
| 720 | 720 | * __Obsolete:__ There is a new property system that does not rely on _setValue. | |
| 721 | 721 | */ | |
| 722 | 722 | _setValue(property: any, value: any): never; | |
| 723 | - | ||
| 724 | - /** | ||
| 725 | - * @private | ||
| 726 | - * Module name in case the view is a root. Otherwise, it is undefined. | ||
| 727 | - */ | ||
| 728 | - _rootOfModule?: string; | ||
| 729 | 723 | } | |
| 730 | 724 | ||
| 731 | 725 | /** | |
| Back | FazBrowse Home | New Git URL |
0 commit comments