-
Notifications
You must be signed in to change notification settings - Fork 723
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
Posibble to add altkeyspopup to the extender #511
Comments
It is already possible... the extender layout needs to contain a key, or keys, setup in the alkeypopup Although, now that I test it, it appears that the popup isn't correctly centered over the extender layout... I'll have to fix that. |
Hmm, and the altKeysPopup breaks after switching layouts... |
Thanks for your quick reply! So, I'll have to add the AltKeysPopup everytime I switch then? That's no big issue :P The correctly center part isn't that important for me, I think, as I move the div to another place on the screen anyway and would probably need to adjust it anyhow. |
Ok, I think everything is all fixed up! demo Here is the hex action button code... you will need to call the $.keyboard.keyaction.hex = function(kb) {
hexActive = !hexActive;
// update state of hex button
$('.ui-keyboard-hex').toggleClass(kb.options.css.buttonActive, hexActive);
// toggle hex button
$keyboard
.addExtender({
layout: hexActive ? 'hexpad' : 'numpad'
})
.addAltKeyPopup({
popupPosition: function(kb, data) {
/*
{
$kb : Keyboard element (jQuery object),
$key : Clicked key element (jQuery object),
$popup : Popup container (jQuery object),
kbHeight : Keyboard element outer height,
kbWidth : Keyboard element outer width,
popupHeight : Popup container height,
popupWidth : Popup container width,
popupLeft : Popup container left position,
popupTop : Popup container top position
}
example: tweak position for extender layout
if (data.$key.closest('.ui-keyboard-extender').length) {
data.$popup.css('left', data.popupLeft - data.$popup.width() * 1.5);
}
*/
}
});
}; |
Ah shiiit, you're just too great haha! Can I get you a beer or something? :P |
I'm probably pushing you into fury by now with all my requests, but is it possible to use the AltKeysPopUp with an extender? I just noticed this seems to be impossible right now, is that correct?
The text was updated successfully, but these errors were encountered: