Skip to:
Content

BuddyPress.org

Ticket #6290: 6290.flip.01.patch

File 6290.flip.01.patch, 1.0 KB (added by DJPaul, 10 years ago)
  • src/bp-core/css/avatar.css

    diff --git a/src/bp-core/css/avatar.css b/src/bp-core/css/avatar.css
    index 32dceaa..f70704c 100644
    a b div.bp-avatar-nav { 
    154154#bp-webcam-avatar video {
    155155        float:left;
    156156        width:450px;
     157        -webkit-transform: scaleX(-1);
     158        transform: scaleX(-1);
    157159}
    158160
    159161#bp-webcam-avatar #avatar-crop-pane {
  • src/bp-core/js/webcam.js

    diff --git a/src/bp-core/js/webcam.js b/src/bp-core/js/webcam.js
    index 3d5f1e7..616f74d 100644
    a b window.bp = window.bp || {}; 
    243243                        sx = ( this.options.video.el.videoWidth - sc ) / 2;
    244244
    245245                        this.options.canvas.el.getContext( '2d' ).drawImage( this.options.video.el, sx, 0, sc, sc, 0, 0, this.model.get( 'w' ), this.model.get( 'h' ) );
     246                        this.options.canvas.el.getContext( '2d' ).translate( this.options.video.el.videoWidth, 0 );
     247                        this.options.canvas.el.getContext( '2d' ).scale( -1, 1 );
    246248                        bp.WebCam.params.capture = this.options.canvas.el.toDataURL( 'image/png' );
    247249                        this.model.set( 'url', bp.WebCam.params.capture );
    248250