Browse Source

Merge pull request #2723 in DESIGN/design from final/10.0 to release/10.0

* commit 'bf71c4981e9fbd5c371c3b45c56f8d89c8df3557':
  REPORT-41855 【设计器】保留布局下图表修改选中全屏设置效果,设计器的保存按钮依然置灰 【问题原因】在不勾选body移动端属性-手机重布局时,如果修改body内的图表块的移动端属性,会造成这边的npe,体现在设计器中就是保存按钮不被触发 【改动思路】增加npe判断
  CHART-16112 富文本标记器browser在初次打开时清理缓存
feature/big-screen
superman 4 years ago
parent
commit
14a1e9f15b
  1. 1
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java
  2. 11
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java

1
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartRichEditorPane.java

@ -38,6 +38,7 @@ public class VanChartRichEditorPane {
.prepare(new ScriptContextAdapter() {
public void onScriptContextCreated(ScriptContextEvent event) {
browser = event.getBrowser();
browser.getCacheStorage().clearCache();
JSValue ns = browser.executeJavaScriptAndReturnValue("window." + namespace);
ns.asObject().setProperty(variable, model);

11
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/ChartEditorDefinePane.java

@ -228,10 +228,13 @@ public class ChartEditorDefinePane extends MobileWidgetDefinePane {
mobileAttr.setAllowFullScreen(allowFullCheckBox.isSelected());
mobileAttr.setFunctionalWhenUnactivated(!functionalWhenUnactivatedCheckBox.isSelected());
}
MobileCollapsedStyle style = this.mobileCollapsedStyleEditor.getStyle();
if (style != null) {
((ChartEditor) xCreator.toData()).setMobileCollapsedStyle(style);
style.setCollapsedWork(this.mobileCollapsedStyleEditor.isSelectedCustom() && !FormDesignerUtils.isInAbsoluteLayout(xCreator));
// 在不勾选body移动端属性-手机重布局时,如果修改body内的图表块的移动端属性,会造成这边的npe,因此加个判断
if (this.mobileCollapsedStyleEditor != null) {
MobileCollapsedStyle style = this.mobileCollapsedStyleEditor.getStyle();
if (style != null) {
((ChartEditor) xCreator.toData()).setMobileCollapsedStyle(style);
style.setCollapsedWork(this.mobileCollapsedStyleEditor.isSelectedCustom() && !FormDesignerUtils.isInAbsoluteLayout(xCreator));
}
}
DesignerContext.getDesignerFrame().getSelectedJTemplate().fireTargetModified(); // 触发设计器保存按钮亮起来
}

Loading…
Cancel
Save