@@ -261,67 +261,7 @@ function fillCatMod(category) {
261261
262262
263263docReady ( function ( ) {
264- document . getElementById ( "catContainer" ) . addEventListener ( 'click' , ( e ) => {
265264
266- const el = e . target ;
267- let parent = null ;
268-
269- if ( el . matches ( ".category" ) ) {
270- parent = el
271- } else if ( el . matches ( ".category p, .category div" ) ) {
272- parent = el . parentNode ;
273- } else if ( el . matches ( ".category img" ) ) {
274- parent = el . parentNode ;
275- displayCat ( parent . getAttribute ( "value" ) )
276-
277- }
278-
279- if ( parent !== null ) {
280-
281- document . getElementById ( "selectedCat" ) . removeAttribute ( "id" )
282- parent . setAttribute ( "id" , "selectedCat" ) ;
283- selectedCategory = parent . getAttribute ( "value" ) ;
284-
285-
286- if ( seldots !== undefined ) {
287- for ( let i = 0 ; i < seldots . length ; i ++ ) {
288- seldots [ i ] . categories [ selectedCategory ] = categories [ selectedCategory ]
289- }
290-
291- seldots = undefined ;
292- over_on = true
293- d3 . select ( "#lasso" ) . remove ( ) ;
294- drawImage ( )
295-
296- }
297- }
298-
299- } ) ;
300-
301-
302- document . getElementById ( "catContainer" ) . addEventListener ( 'mouseover' , ( e ) => {
303-
304- const el = e . target ;
305- let parent = null ;
306-
307- if ( el . matches ( ".category" ) ) {
308- parent = el
309- } else if ( el . matches ( ".category p, .category div" ) ) {
310- parent = el . parentNode ;
311- }
312-
313- if ( parent !== null ) {
314- let samples = getSamplesFromCategory ( parent . getAttribute ( "value" ) )
315- if ( samples !== [ ] ) {
316- drawSamples ( samples ) ;
317- }
318- }
319- } ) ;
320-
321- document . getElementById ( "catContainer" ) . addEventListener ( 'mouseout' , ( e ) => {
322-
323- resetImg ( )
324- } ) ;
325265
326266 document . getElementById ( "marks" ) . addEventListener ( 'mouseout' , ( e ) => {
327267 resetImg ( )
@@ -745,7 +685,7 @@ function drawCat(name, color, selected = false) {
745685 newCat . setAttribute ( "value" , name ) ;
746686
747687 newCat . innerHTML = "<div class='lightBorder catColor' style='background-color: " + color + "'> </div> <p>" + name + "</p><img src=\"assets/images/buttons/edit.png\" class=\"editCat\">"
748- document . getElementById ( "catContainer" ) . insertBefore ( newCat , document . getElementById ( "addCat" ) )
688+ // document.getElementById("catContainer").insertBefore(newCat, document.getElementById("addCat"))
749689
750690}
751691
0 commit comments