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.23.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.22.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.21.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.20.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.20.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.19.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.18.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.18.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.17.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.16.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.15.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.14.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.14.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.13.2 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.13.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.13.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.12.1 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.12.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.11.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js
mumuki-laboratory-9.10.0 app/assets/javascripts/mumuki_laboratory/application/certificate.js