Minor fixes
This commit is contained in:
parent
073f087e52
commit
aa0906405c
19 changed files with 219 additions and 174 deletions
5
src/framework/helper/animations.ts
Normal file
5
src/framework/helper/animations.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export const turnOnAnimations = () =>
|
||||
document.body.parentElement.setAttribute('animations', 'on');
|
||||
|
||||
export const turnOffAnimations = () =>
|
||||
document.body.parentElement.setAttribute('animations', 'off');
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
export const addImul = () => {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
|
||||
if (!Math.imul)
|
||||
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul
|
||||
Math.imul = function(opA, opB) {
|
||||
opB |= 0; // ensure that opB is an integer. opA will automatically be coerced.
|
||||
// floating points give us 53 bits of precision to work with plus 1 sign bit
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { addImul } from '../polyfills';
|
||||
import { addImul } from './polyfills';
|
||||
|
||||
export class Random {
|
||||
public constructor(private seed: number) {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,10 @@ export class Anchor implements Primitive {
|
|||
) {}
|
||||
|
||||
public toHTML(): html {
|
||||
return `<a class="primitive-anchor" href="${this.href}" rel="noreferrer" target="_blank">${this.text}</a>`;
|
||||
return `<a class="primitive-anchor"
|
||||
href="${this.href}"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>${this.text}</a>`;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue