diff --git a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/platform/PlatformViewsController.ets b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/platform/PlatformViewsController.ets index c3fd15e16e554032f4d1b4317ddcf91208eb2e98..e0552a797a4549025b5fe333704281f5de1492cf 100644 --- a/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/platform/PlatformViewsController.ets +++ b/shell/platform/ohos/flutter_embedding/flutter/src/main/ets/plugin/platform/PlatformViewsController.ets @@ -88,8 +88,6 @@ export default class PlatformViewsController implements PlatformViewsAccessibili private currentFrameUsedPlatformViewIds: HashSet; private platformViewParent: Map; private nodeControllers: Stack; - private viewPhysicalInfo: Map = new Map(); - private dValue: number = 1; constructor() { this.registry = new PlatformViewRegistryImpl(); @@ -138,9 +136,6 @@ export default class PlatformViewsController implements PlatformViewsAccessibili return; } this.platformViews.delete(viewId); - if (this.viewPhysicalInfo.has(viewId)) { - this.viewPhysicalInfo.delete(viewId); - } let textureId = this.viewIdWithTextureId.get(viewId); if (textureId != undefined) { @@ -182,26 +177,6 @@ export default class PlatformViewsController implements PlatformViewsAccessibili let viewWrapper = this.viewWrappers.get(request.viewId) let params: DVModelParameters | undefined = viewWrapper?.getDvModel()!.params - - const platformView = this.platformViews.get(request.viewId); - if (platformView?.getType() === 'web') { - let oldPhysicalHeight: number = 0; - if (this.viewPhysicalInfo.has(viewId)) { - oldPhysicalHeight = this.viewPhysicalInfo.get(viewId) as number; - //高度变化小于1,不做刷新处理,减少闪烁 - if (physicalHeight - oldPhysicalHeight < this.dValue) { - - this.setParams(params!, "width", physicalWidth); - this.setParams(params!, "height", oldPhysicalHeight); - - onComplete.run(new PlatformViewBufferSize(physicalWidth, oldPhysicalHeight)); - return; - } - } - } - - //保存组件最高位置,解决webview上下滑动带来的组件高度变化而引起的页面闪烁 - this.viewPhysicalInfo.set(viewId, physicalHeight); this.setParams(params!, "width", physicalWidth); this.setParams(params!, "height", physicalHeight);