Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Stephano Apiolaza
    @stephanoapiolaza
    hi guys
    are you there?
    Peter Širka
    @petersirka
    Hi @stephanoapiolaza, yes.
    Stephano Apiolaza
    @stephanoapiolaza
    thanks,but i have fixed my trouble
    Peter Širka
    @petersirka
    @stephanoapiolaza I recommend to use jComponent -> www.jcomponent.org ... Thanks.
    A. Moore
    @gnetsys

    @petersirka does JComponent Support Html5 Canvas

        self.setter = function(){
              canvas = self.element.find('canvas');
    
            if (canvas){
                console.log(true);
            }
    
            ctx = canvas.getContext('2d');  // fail 
            self.image = new Image();
    
            self.image.on('load', function() {
               ctx.drawImage(self.image, 69, 50);
            });
    
            self.image.src = self.get(select + 'picture.')[0];
            console.log(  );
    
     }

    Or must it be called within another code - block..

    Peter Širka
    @petersirka
    Of course, but you have to modify your code a bit:
    self.setter = function(){
        canvas = self.find('canvas');
    
        if (!canvas.length) {
            console.log(true);
            return;
        }
    
        ctx = canvas.get(0).getContext('2d');  // fail 
        self.image = new Image();
    
        self.image.on('load', function() {
           ctx.drawImage(self.image, 69, 50);
        });
    
        self.image.src = self.get(select + 'picture.')[0];
    }