Sha256: 5ced38d4f86e1e4086e890803c59f0744e319db2a25a2c1f4f1a21165b07d0dc

Contents?: true

Size: 506 Bytes

Versions: 44

Compression:

Stored size: 506 Bytes

Contents

mumuki.load(() => {
  scaleCertificate();
  mumuki.resize(scaleCertificate);

  function scaleCertificate() {
    const $certPreview = $('.certificate-preview');
    const $muCertificate = $('.mu-certificate-box');
    $muCertificate.css('transform', 'scale(1)');

    const scaleWidth = $muCertificate.width() / $certPreview.width();
    $muCertificate.css({
      'transform': `scale(${1 / scaleWidth})`,
      'transform-origin': `0 0`,
    });
    $certPreview.height($muCertificate.height());
  }
});

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
mumuki-laboratory-9.9.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.8.2 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.8.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.8.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.7.2 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.7.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.7.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.6.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.5.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.5.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.4.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.4.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.3.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.3.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.2.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.1.3 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.1.2 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.1.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.1.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.0.6 app/assets/javascripts/mumuki_laboratory/application/certificate.js