barsa-novin-ray-core 2.3.3 → 2.3.6
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.
|
@@ -1600,7 +1600,8 @@ function throwIfAlreadyLoaded(parentModule, moduleName) {
|
|
|
1600
1600
|
}
|
|
1601
1601
|
const measureTextValues = {};
|
|
1602
1602
|
function measureText2(text, fontSize, fontName) {
|
|
1603
|
-
|
|
1603
|
+
const key = `${text}${fontSize}${fontName}`;
|
|
1604
|
+
if (measureTextValues[key]) {
|
|
1604
1605
|
return measureTextValues[text];
|
|
1605
1606
|
}
|
|
1606
1607
|
const measureTextDom = document.getElementById('measureText');
|
|
@@ -1612,7 +1613,7 @@ function measureText2(text, fontSize, fontName) {
|
|
|
1612
1613
|
fontName = fontName ? fontName : 'B-Font';
|
|
1613
1614
|
ctx.font = `normal ${fontSize} ${fontName}`;
|
|
1614
1615
|
const x = ctx.measureText(text).width;
|
|
1615
|
-
measureTextValues[
|
|
1616
|
+
measureTextValues[key] = x;
|
|
1616
1617
|
return x;
|
|
1617
1618
|
}
|
|
1618
1619
|
function measureText(text, fontSize) {
|
|
@@ -3926,6 +3927,7 @@ class PortalService {
|
|
|
3926
3927
|
const portalData = portalSetting;
|
|
3927
3928
|
if (portalData) {
|
|
3928
3929
|
const defaultPage = this._getDefaultPage(portalData.ChildPageList.MoDataList);
|
|
3930
|
+
const isdynamicroute = portalData.IsDynamicRoute === 'True';
|
|
3929
3931
|
this.DefaultPage = defaultPage;
|
|
3930
3932
|
let configRoute = this._router.config;
|
|
3931
3933
|
const removePaged = [];
|
|
@@ -3943,7 +3945,7 @@ class PortalService {
|
|
|
3943
3945
|
});
|
|
3944
3946
|
if (defaultPage != null) {
|
|
3945
3947
|
const defaultPageRoute = defaultPage.Route.replace('/', '');
|
|
3946
|
-
if (
|
|
3948
|
+
if (isdynamicroute) {
|
|
3947
3949
|
const defaultPath = newConfigRoutes.find((c) => c.path === '');
|
|
3948
3950
|
defaultPath && (defaultPath.redirectTo = defaultPageRoute);
|
|
3949
3951
|
newConfigRoutes.push({ path: '**', redirectTo: defaultPageRoute });
|
|
@@ -3955,7 +3957,7 @@ class PortalService {
|
|
|
3955
3957
|
}
|
|
3956
3958
|
// const notFoundPath = configRoute.find((c) => c.path === '**');
|
|
3957
3959
|
// notFoundPath && (notFoundPath.redirectTo = defaultPage.Route.replace('/', ''));
|
|
3958
|
-
this._router.resetConfig(
|
|
3960
|
+
this._router.resetConfig(isdynamicroute ? newConfigRoutes : configRoute);
|
|
3959
3961
|
}
|
|
3960
3962
|
}
|
|
3961
3963
|
this.extractAllPages(portalData);
|