1
Apache Flex 4.9.1로 작성된 webapp가 있는데 기본 응용 프로그램의 하위 구성 요소를 전체 화면으로 만들려고합니다. 내보기 크기가 변경되지 않는 다음 코드를 시도했습니다.Flex 4.9.1 전체 화면
private function onFullScreen(event:MouseEvent):void
{
this.removeElement(view);
this.stage.getChildAt(0).visible = false;
this.stage.addChild(view);
view.width = stage.fullScreenWidth;
view.height = stage.fullScreenHeight;
this.stage.displayState = StageDisplayState.FULL_SCREEN;
this.stage.addEventListener(FullScreenEvent.FULL_SCREEN, onFullScreenChange);
}
private function onFullScreenChange(event:FullScreenEvent):void
{
this.stage.removeEventListener(FullScreenEvent.FULL_SCREEN, onFullScreenChange);
if (!event.fullScreen)
{
this.stage.getChildAt(0).visible = true;
this.stage.removeChild(view);
this.addElement(view);
view.percentHeight = view.percentWidth = 100;
}
}
보기에서 무효화를 시도했지만 아무것도 작동하지 않는 것 같습니다.
예 구성 요소는 전체 화면으로 표시되지만 사용 가능한 공간을 모두 차지하지 않습니다. – user1949178
너비/높이를 100 %로 설정하면 어떻게됩니까? –
구성 요소가 원래 너비와 높이로 나타납니다. 디버거를 통해 그것을 실행하고 구성 요소를 적절한 너비와 높이 (fullscreenWidth 및 fullscreenHeight) 표시하지만 화면에 업데이트되지 않습니다. 무효화를 시도했지만 도움이되지 않았습니다. – user1949178