나는이 문제에 정신 나간다. 내가하고 싶은 것은 StackContainer를 상속 받아 간단한 효과를 추가하는 것뿐입니다. 참고 : 전이할만한 실험 위젯이 너무 복잡하다는 것을 알고 있습니다. 그러나 코드는 과도한 총량입니다. 내가 뭘했는지가 가장 단순한데 스택 컨테이너가 전환을 수행하는 방법.Dojo에서 _transition 메소드를 오버로드
이 작동하지 않는 예는 다음과 같습니다
declare('app.StackFade', [ StackContainer], {
_transition:function(newWidget, oldWidget){
// this.inherited(arguments); // This breaks things, obviously
console.log("Transition called");
html.style(oldWidget.domNode, "opacity", 1);// Random attempt
baseFx.fadeOut({
node:oldWidget.domNode,
duration: 500,
onEnd: function(){
console.log("First animation finished");
baseFx.fadeIn({
node:newWidget.domNode,
duration:500,
onEnd: function(){
html.style(newWidget.domNode, "opacity", 0);
lang.hitch(this,"inherited", arguments, arguments); // this doesn't work
console.log("Second animation finished");
},
}).play();
}
}).play();
}
}
어떻게 작동 하나에이 작동하지 않는 예를 설정합니까? 다시 말하지만, 나는 아주 간단한, 평범한, _transition을 바꾸는 몇 줄의 코드를 따른다.