()
| 140 | } |
| 141 | |
| 142 | private _dealRenderContent(): void { |
| 143 | const bridgeRendered = this._bridgeRendered; |
| 144 | if (!bridgeRendered || bridgeRendered.renderVersion !== this._renderVersion) { |
| 145 | return; |
| 146 | } |
| 147 | |
| 148 | const targetGroup = this._targetGroup; |
| 149 | const coordSys = this._coordSys; |
| 150 | const contentRect = this._contentRect; |
| 151 | |
| 152 | targetGroup.removeAll(); |
| 153 | |
| 154 | if (!bridgeRendered) { |
| 155 | return; |
| 156 | } |
| 157 | |
| 158 | const bridgeGroup = bridgeRendered.group; |
| 159 | const bridgeRect = bridgeGroup.getBoundingRect(); |
| 160 | |
| 161 | targetGroup.add(bridgeGroup); |
| 162 | |
| 163 | this._bgRect.z2 = bridgeRendered.z2Range.min - 10; |
| 164 | |
| 165 | viewCoordSysSetBoundingRect(coordSys, bridgeRect.x, bridgeRect.y, bridgeRect.width, bridgeRect.height); |
| 166 | // Use `getLayoutRect` is just to find an appropriate rect in thumbnail. |
| 167 | const viewRect = getLayoutRect( |
| 168 | { |
| 169 | left: 'center', |
| 170 | top: 'center', |
| 171 | aspect: bridgeRect.width / bridgeRect.height |
| 172 | }, |
| 173 | contentRect |
| 174 | ); |
| 175 | viewCoordSysSetViewRect(coordSys, viewRect.x, viewRect.y, viewRect.width, viewRect.height); |
| 176 | viewCoordSysCopyTrans(bridgeGroup, coordSys, VIEW_COORD_SYS_TRANS_RAW); |
| 177 | bridgeGroup.dirty(); |
| 178 | |
| 179 | this._windowRect.z2 = bridgeRendered.z2Range.max + 10; |
| 180 | |
| 181 | this._resetRoamController(bridgeRendered.roamType); |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * Can be called from action handler directly. |
no test coverage detected