残念ながら、それを行うための組み込み機能はありません。そのため、アプリケーション ロジックの一部にする必要があります。
たとえば、shapesLayer というレイヤーがあるとします。できるよ:
function radiusLessThanFive(){
var circles = shapesLayer.get('.circle'); // I can't remember the getting all circles syntax, but something like this
for ( var i=0; i<circles.length; i++) {
if(cicrles[i].getRadius() < 5 ){
circles[i].remove();
shapesLayer.draw();
}
}
}
これはこれまでで最も効率的なソリューションではありませんが、仕事は完了します... javascript で独自のカスタムイベントを作成する方法を知っていない限り (上記の関数と同じことを行う必要があります)。
カスタム イベント ロードを利用する場合は、次のリンクを参照してください: http://www.sitepoint.com/javascript-custom-events/
編集:以下のコメントについて
function radiusLessThanFive(myCircle){ //function which checks radius of single circle and deletes if less than 5
if(myCircle.getRadius() < 5 ){
myCircle.remove();
myCircle.getParent().draw();
}
}
}