Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KerucSettings object to be passed in as formal param #3

Open
ShadAhm opened this issue Dec 6, 2018 · 0 comments
Open

KerucSettings object to be passed in as formal param #3

ShadAhm opened this issue Dec 6, 2018 · 0 comments
Assignees
Milestone

Comments

@ShadAhm
Copy link
Owner

ShadAhm commented Dec 6, 2018

Old:

<keruc-seatpicker
    data-data="seatsData"
    data-canvas-width="500"
    data-canvas-height="500"
    data-vacant-colour-bg="#76D75D"
    data-vacant-colour-fg="#C1F2B4"
    data-occupied-colour-bg="#F56979"
    data-occupied-colour-fg="#BB1F31"
    data-selected-colour-bg="#7854AF"
    data-selected-colour-fg="#472085"
></keruc-seatpicker>

Change instead to:

<keruc-seatpicker
    data-data="seatsData"
    data-settings="kerucSettings"
></keruc-seatpicker>

The keruc settings are to be defined in parent controller, like so:

scope.kerucSettings = {
    canvasWidth: 500,
    canvasHeight: 500,
    vacantColourBg: '#76D75D'
    // ... etc
};

Where a setting is not specified, the default values will be used.

@ShadAhm ShadAhm added this to the 1.0 milestone Dec 6, 2018
@ShadAhm ShadAhm self-assigned this Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant