Нажмите событие на строку таблицы - только инициировали, если ничто иное не 'нажато'

Просто посмотрите на свой класс SCNView, там много чего интересного.

/*!
@method hitTest:options:
@abstract Returns an array of SCNHitTestResult for each node that contains a specified point.
@param point A point in the coordinate system of the receiver.
@param options Optional parameters (see the "Hit test options" group for the available options).
*/
let hitResults:[SCNHitTestResult] = mySCNView.hitTest(point, options:[:])

https://developer.apple.com/documentation/scenekit/scnhittestresult

https://developer.apple.com/documentation/scenekit/ scnhittestresult / 1523058-worldcoordinates

12
задан kastermester 18 May 2009 в 00:56
поделиться

3 ответа

Попробуйте добавить обработчики к другим элементам, которые реагируют на события щелчка и останавливают всплытие события. Это будет в дополнение к тому, что у вас уже есть.

jQuery('table input, table a').click( function(e) {
    e.stopPropagation();
    return true;
}):
15
ответ дан 26 October 2019 в 10:46
поделиться
$("table tr").click(function(e){

if (e.target instanceof HTMLInputElement || e.target instanceof HTMLAnchorElement){
return;
}
var row=$(this);
$('table tr').removeClass('highlight');
row.addClass('highlight','normal');

})
1
ответ дан 26 October 2019 в 10:46
поделиться
$("table tr").click(function(event){
   if (event.currentTarget.tagName != "TR") { return; }

   $(this).closest("table").find("tr.highlight").removeClass("highlight");
   $(this).addClass("highlight");
});
3
ответ дан 26 October 2019 в 10:46
поделиться
Другие вопросы по тегам:

Похожие вопросы: