以下Polymer代码适用于IE11和chrome V50
function intersect(obj1, obj2){
var objBounds1 = obj1.nominalBounds.clone();
var objBounds2 = obj2.nominalBounds.clone();
var pt = obj1.globalToLocal(objBounds2.x, objBounds2.y);
var h1 = -(objBounds1.height / 2 + objBounds2.height);
var h2 = objBounds2.height / 2;
var w1 = -(objBounds1.width / 2 + objBounds2.width);
var w2 = objBounds2.width / 2;
if(pt.x > w2 || pt.x < w1) return false;
if(pt.y > h2 || pt.y < h1) return false;
return true;
}
<template is="dom-repeat" items="[[buddys]]" as="partner">
<paper-card style="width:100%;">
<div class="card-content">
[[partner.name]]
<paper-icon-button
id="more-info"
icon="more-horiz"
on-click="_spielerDialog"
data-index$="[[partner.__firebaseKey__]]"
style="float:right;">
</paper-icon-button>
</div>
</paper-card>
</template>
点击Firefox V 45.0.2的图标按钮后出现 ReferenceError:未定义事件
答案 0 :(得分:0)
_spielerDialog: function(**event**) {