0
私はイオン性が新しく、角度は& HTML(noob alert)です。スワイプイベントのスワイプサーフェスを作成し、ボタンタグを使用しようとしています。私の問題は、ボタンをクリックしたときのデフォルトの動作、特にそれに付属するデフォルトのアニメーションが必要ないということです。モバイル向けにスワイプする必要があります。スワイプイベントのボタンクリックなしのデフォルトのアニメーションなし
これを行う方法はありますか?私はこれが非常に基本的で、私のアプローチはおそらく間違っていると思う。
マイスワイプキー指令:
app.directive('swipeKey', ['DimensionCalculator', function(DimensionCalculator) { return {
restrict: 'E',
replace: true,
template: '<button><img src="../img/1465502670_Spread.png"></img></button>',
link: function(scope, elem, attrs) {
console.log("swipeKey Directive: getSwipeButtonHeight=" + DimensionCalculator.getSwipeButtonHeight());
elem.css('height', DimensionCalculator.getSwipeButtonHeight() + 'px');
elem.css('width', DimensionCalculator.getSwipeButtonWidth() + 'px');
elem.css('position', 'fixed');
elem.css('background', 'url(../img/brushed1.jpg)');
elem.css('z-index', '1');
私のHTML:
<swipe-key on-swipe-up="Game.handleSwipeUp()" on-swipe-down="Game.handleSwipeDown()" on-tap="Game.handleSwipeUp()"></swipe-key>
DimensionCalculatorは、寸法のためのサービスです。
ボタンが持つデフォルトの「クリック」アニメーションが必要ないことを除いて、すべてが正常に機能します。 ありがとう!
まだ試しましたか?どのような問題が発生しましたか?質問を編集して、あなたが試したコードを投稿してください。 – Lexi