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

Adjusting keyboard size in angular module config doesn't work #23

Open
MidanRayam opened this issue Dec 11, 2015 · 0 comments
Open

Adjusting keyboard size in angular module config doesn't work #23

MidanRayam opened this issue Dec 11, 2015 · 0 comments

Comments

@MidanRayam
Copy link

This doesn't work:

.config(['VKI_CONFIG', function(VKI_CONFIG) {
    VKI_CONFIG.size = 3;
  }])`

This fixes it for me:
config.size = config.size >=1 && config.size <= 5 ? config.size : VKI_CONFIG.size;

In:

.service('ngVirtualKeyboardService', ['VKI_CONFIG', function(VKI_CONFIG) {
    /*globals VKI */
    return {
        attach: function(element, config, inputCallback) {
            config = config || {};
            config.i18n = config.i18n || VKI_CONFIG.i18n;
            config.kt = config.kt || VKI_CONFIG.kt;
            config.relative = config.relative === false ? false : VKI_CONFIG.relative;
            config.keyCenter = config.keyCenter || VKI_CONFIG.keyCenter;
      config.size = config.size >=1 && config.size <= 5 ? config.size : VKI_CONFIG.size;
            config.sizeAdj = config.sizeAdj === false ? false : VKI_CONFIG.sizeAdj;
            config.customClass = config.customClass || VKI_CONFIG.customClass;

            var vki = new VKI(config, VKI_CONFIG.layout, VKI_CONFIG.deadkey, inputCallback);
            vki.attachVki(element);
        }
    };
}])```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant