<commit_before>import Group from '../display/group.js'
import Path from '../display/path.js'
import Render from './render.js'

class SVGRender extends  Render {
    constructor(svg){
        super()
        this.svg = svg
    }

    render(obj){
        if(obj instanceof Path){
            this.renderPath(obj)
        }else if (obj instanceof  Group){

        }
    }

    clear(){
    }

    hitAABB(){

    }

    hitPixel(){

    }

    renderPath(obj) {


        //M = moveto
        //L = lineto
        //H = horizontal lineto
        //V = vertical lineto
        //C = curveto
        //S = smooth curveto
        //Q = quadratic Belzier curve
        //T = smooth quadratic Belzier curveto
        //A = elliptical Arc
        //Z = closepath
        //<path d="M250 150 L150 350 L350 350 Z" />
        obj._computeMatrix()
        obj.element.setAttribute('d', obj.d)
        obj.element.style = obj.style
        obj.element.setAttribute( 'transform', 'matrix(' + obj._matrix.a + ',' + obj._matrix.b + ',' + obj._matrix.c + ',' + obj._matrix.d + ',' + obj._matrix.tx + ',' + obj._matrix.ty + ')' )
        if(!document.body.contains(obj.element)){
            this.svg.appendChild(obj.element)
        }
    }
}

export default SVGRender;<commit_msg>remove hit method in svg render<commit_after>import Group from '../display/group.js'
import Path from '../display/path.js'
import Render from './render.js'

class SVGRender extends  Render {
    constructor(svg){
        super()
        this.svg = svg
    }

    render(obj){
        if(obj instanceof Path){
            this.renderPath(obj)
        }else if (obj instanceof  Group){

        }
    }

    clear(){

    }


    renderPath(obj) {
        //M = moveto
        //L = lineto
        //H = horizontal lineto
        //V = vertical lineto
        //C = curveto
        //S = smooth curveto
        //Q = quadratic Belzier curve
        //T = smooth quadratic Belzier curveto
        //A = elliptical Arc
        //Z = closepath
        //<path d="M250 150 L150 350 L350 350 Z" />
        obj._computeMatrix()
        obj.element.setAttribute('d', obj.d)
        obj.element.style = obj.style
        obj.element.setAttribute( 'transform', 'matrix(' + obj._matrix.a + ',' + obj._matrix.b + ',' + obj._matrix.c + ',' + obj._matrix.d + ',' + obj._matrix.tx + ',' + obj._matrix.ty + ')' )
        if(!document.body.contains(obj.element)){
            this.svg.appendChild(obj.element)
        }
    }
}

export default SVGRender;
{'fraction_non_alphanumeric': 0.1385148133897653, 'fraction_numerical': 0.01385148133897653, 'mean_word_length': 1.6052104208416833, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6311046', 'n_tokens_mistral': 867, 'n_tokens_neox': 778, 'n_words': 182}