Bundled card classes.

This commit is contained in:
Uwe Oestermeier 2019-07-16 09:27:48 +02:00
parent 54912ad37e
commit 09b50d3b81
6 changed files with 2152 additions and 108 deletions

2223
dist/iwmlib.js vendored

File diff suppressed because it is too large Load Diff

View File

@ -19,9 +19,10 @@ import {ITapDelegate, ResizeEvent, DOMScatterContainer, AbstractScatter, DOMScat
import { Cycle, Colors, Elements, Angle, Dates, Points, Polygon, Rect, Sets, Strings, isEmpty, getId, lerp, debounce, randomInt, randomFloat, LowPassFilter } from './utils.js' import { Cycle, Colors, Elements, Angle, Dates, Points, Polygon, Rect, Sets, Strings, isEmpty, getId, lerp, debounce, randomInt, randomFloat, LowPassFilter } from './utils.js'
import UITest from './uitest.js' import UITest from './uitest.js'
import {CardWrapper} from './card/wrapper.js' import CardWrapper from './card/wrapper.js'
import {Highlight} from './card/highlight.js' import Highlight from './card/highlight.js'
import Card from './card/card.js'
import Theme from './card/theme.js'
/* Needed to ensure that rollup.js includes class definitions and the classes /* Needed to ensure that rollup.js includes class definitions and the classes
are visible inside doctests. are visible inside doctests.
@ -88,4 +89,6 @@ window.randomInt = randomInt
window.randomFloat = randomFloat window.randomFloat = randomFloat
window.CardWrapper = CardWrapper window.CardWrapper = CardWrapper
window.Card = Card
window.Highlight = Highlight window.Highlight = Highlight
window.Theme = Theme

View File

@ -29,7 +29,7 @@ const enableNearestNeighborTaps = false
* *
* The class is used as a namespace and should never called with new. * The class is used as a namespace and should never called with new.
*/ */
class Card { export default class Card {
static setup(context, modules = []) { static setup(context, modules = []) {
console.log("Setup Card...", modules) console.log("Setup Card...", modules)

View File

@ -30,7 +30,7 @@ function round(value) {
* @class Highlight * @class Highlight
* @extends {Object} * @extends {Object}
*/ */
export class Highlight extends Object { export default class Highlight extends Object {
static disableAnimations() { static disableAnimations() {
_HighlightEnabled = false _HighlightEnabled = false

View File

@ -6,7 +6,7 @@
* *
* @class Theme * @class Theme
*/ */
class Theme { export default class Theme {
/** /**
* Loads a config file and parses it to JSON. * Loads a config file and parses it to JSON.

View File

@ -4,7 +4,7 @@
import Events from '../events.js' import Events from '../events.js'
import { Points } from '../utils.js' import { Points } from '../utils.js'
export class CardWrapper extends Object { export default class CardWrapper extends Object {
constructor(domNode, { triggerSVGClicks = true, allowClickDistance = 44 } = {}) { constructor(domNode, { triggerSVGClicks = true, allowClickDistance = 44 } = {}) {
super() super()