@lexriver/dome 1.5.7 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/DomeRouter.d.ts +1 -1
- package/out/DomeRouter.js +4 -3
- package/package.json +1 -1
- package/src/DomeRouter.ts +3 -3
package/out/DomeRouter.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare module DomeRouter {
|
|
|
13
13
|
* @param previousPageIndex 0=previousPage, 1=previousPage-1, etc
|
|
14
14
|
*/
|
|
15
15
|
function getPreviousPageUrl(previousPageIndex?: number): string | undefined;
|
|
16
|
-
function resolveUrl(url?: string): void;
|
|
16
|
+
function resolveUrl(url?: string, addToHistory?: boolean): void;
|
|
17
17
|
function onRoute(route: string, exactMatch: boolean, action: RouteAction): void;
|
|
18
18
|
function onNotFound(action: () => void): void;
|
|
19
19
|
/**
|
package/out/DomeRouter.js
CHANGED
|
@@ -83,9 +83,10 @@ export var DomeRouter;
|
|
|
83
83
|
// if(addToHistory) addUrlToHistory(url)
|
|
84
84
|
// executeAsync(url, getScrollPositionForUrl(url)) // TODO: check
|
|
85
85
|
// }
|
|
86
|
-
function resolveUrl(url = window.location.pathname) {
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
function resolveUrl(url = window.location.pathname, addToHistory = true) {
|
|
87
|
+
if (addToHistory)
|
|
88
|
+
addUrlToHistory(window.location.pathname);
|
|
89
|
+
executeAsync(url, getScrollPositionForUrl(url));
|
|
89
90
|
}
|
|
90
91
|
DomeRouter.resolveUrl = resolveUrl;
|
|
91
92
|
function onRoute(route, exactMatch, action) {
|
package/package.json
CHANGED
package/src/DomeRouter.ts
CHANGED
|
@@ -112,9 +112,9 @@ export module DomeRouter {
|
|
|
112
112
|
// executeAsync(url, getScrollPositionForUrl(url)) // TODO: check
|
|
113
113
|
// }
|
|
114
114
|
|
|
115
|
-
export function resolveUrl(url:string = window.location.pathname){
|
|
116
|
-
|
|
117
|
-
executeAsync(url, getScrollPositionForUrl(url))
|
|
115
|
+
export function resolveUrl(url:string = window.location.pathname, addToHistory = true){
|
|
116
|
+
if(addToHistory) addUrlToHistory(window.location.pathname)
|
|
117
|
+
executeAsync(url, getScrollPositionForUrl(url))
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
export function onRoute(route:string, exactMatch:boolean, action:RouteAction){
|