posts
android4標準のデバッグ
export PATH=$PATH:/Applications/Genymotion.app/Contents/MacOS/tools
パス通す。
$ adb root
$ adb remount
$ adb push /etc/hosts /system/etc
adb logcat | grep browser
ブラウザから
about:debug
でも見れる...
colorboxでiframe読み込んだ際のクリックイベント
colorboxとiframeの組み合わせでちょっと詰まったのでメモ。
iframeは普通にjqueryのセレクタだと駄目っぽいです。.contents().find()でiframeの中身にバインドできるみたいです。
$('iframe a').click(function(e) {
// 駄目っぽい
})
$('iframe').contents().find('a').click(function(e) {
// なんか処理
})
クリックでcolorboxのiframe呼び出してモーダルコンテンツ切り替えてiframe内の要素にもクリックのイベントつけたいような内容だったのですがどうもiframe内の要素取得できないない様子。
colorboxのリファレンスみるとcbox_completeなるもの...
translate3dで3dcarouselっぽいもの firefoxでおかしい時
.firefox .carousel ul{
-webkit-transform-style: preserve-3d!important;
transform-style: flat!important;
}
.carousel{
margin-top: 50px;
height:150px;
margin-bottom: 50px;
}
.carousel ul{
position: relative;
-webkit-t...
androidでongesturechangeとe.scale
スマホのピンチイン/ピンチアウトで処理行う場合iosはongesturechangeでe.scaleってプロパティがデフォルトでありますが
androidの場合ongesturechangeもスケール値も自前で実装する必要がある様子。
一部抜粋で状況で調整必要ですが、基本的にtouchstart時touchmove(gesturechange)時の二本の指の距離をとって下記の感じでe.scale同様の数値とれると思います。
class Point
constructor: (x = 0,y = 0) ->
@x = x || 0;
@y = y || 0;
distance:(p1,p2)=>
a = p1.x - p2.x;
b = p1.y - p2.y;
return Math.sqrt(Math.pow(a...
maxmsp attack + fft + gl.pix
...