반응형
넥사크로에서는 지원하지 않는 CSS를 테마 파일에 넣으면 테마 파일을 저장할 때 아예 에러가 나버린다.

이걸 어떻게 하면 사용할 수 있지 하다가 자바스크립트니까 스크립트에서 객체에 접근해서 설정할 수도 있을 거란 생각이 들어서 바로 테스트해봤다.
일단 화면에 돌려버릴 버튼 하나를 만든다.

그리고 버튼에 onmouseenter(), onmouseleave() 이벤트를 걸어주고
폼에도 onload() 이벤트를 걸어준다.
그리고 스크립트에서 document로 객체를 불러와 style을 직접 준다.
this.fvButton;
this.Form_Work_onload = function(obj:nexacro.Form,e:nexacro.LoadEventInfo)
{
this.fvButton = document.getElementById(this.Button00._unique_id);
this.fvButton.style.setProperty("transition", "transform 0.3s ease");
};
this.Button00_onmouseenter = function(obj:nexacro.Button,e:nexacro.MouseEventInfo)
{
this.fvButton.style.setProperty("transform", "rotate(10deg)");
};
this.Button00_onmouseleave = function(obj:nexacro.Button,e:nexacro.MouseEventInfo)
{
this.fvButton.style.setProperty("transform", "rotate(0deg)");
};
이렇게하면 잘 동작하는 걸 확인할 수 있다.
근데 이런 특별한 CSS를 넣을 수 있는 화면이 많다면.. 차라리 그냥 안하는게 더 좋을 것 같다.

역시 무조건 안된다는 말보다는 일단 생각해보고 테스트 해보는게 중요한 것 같다.
문제해결능력을 더 쑥쑥 키우자.
반응형