Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Resizing columns not possible?
Resizing columns not possible?
Hi there, it looks like resizing columns is no longer possible (touch device)? This had alway worked with the (old) nuBuilder.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Resizing columns not possible?
Timo,
I can't resize either on a mobile phone. As you said, this used to work before.
I can't resize either on a mobile phone. As you said, this used to work before.
Re: Resizing columns not possible?
Thanks for confirming Kevin. Do you have any idea how to make this work again?
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Resizing columns not possible?
I see that there have been changes to the resize code in nucommon.js. Something doesn't seem to work as before, but can't say exactly what. Let's wait for Steven to have a closer look at it.
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Resizing columns not possible?
window.nuBROWSERESIZE.pointer is not set anymore in nucommon.js.
Compare the old code:
with the current:
Compare the old code:
Code: Select all
$("#"+div_id).on('touchstart.nuresizecolumn', function(event) {
event.preventDefault();
window.nuBROWSERESIZE.mouse_down = true;
window.nuBROWSERESIZE.pointer = 'finger_touch';
window.nuBROWSERESIZE.moving_element = this.id;
nu_get_start_pos(event);
});
with the current:
Code: Select all
function nuDownBrowseResize(e){
e.preventDefault();
window.nuBROWSERESIZE.mouse_down = true;
window.nuBROWSERESIZE.moving_element = e.target.id;
window.nuBROWSERESIZE.x_position = e.clientX;
$(e.target).css('background-color', '#badeeb');
}
-
- nuBuilder Team
- Posts: 4307
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 448 times
- Contact:
Re: Resizing columns not possible?
The fix could look like this:
(I'm not sure if it is required to pass the p argument to nuDragBrowseColumn() or if it is sufficient to modify just nuDownBrowseResize() )
Add a 2nd argument to some functions:
Then modify nuDownBrowseResize():
And nuDragBrowseColumn()
(I'm not sure if it is required to pass the p argument to nuDragBrowseColumn() or if it is sufficient to modify just nuDownBrowseResize() )
Add a 2nd argument to some functions:
Code: Select all
function nuDragTitleEvents(){
// [............]
$('#nubody').on('mousemove.nuresizecolumn', function(event) {nuDragBrowseColumn(event, 'pointer');});
$('.nuBrowseTitle').on('mousedown.nuresizecolumn', function(event) {nuDownBrowseResize(event, 'pointer')});
$('#nubody').on('mouseup.nuresizecolumn', function(event) {nuEndBrowseResize();});
$('.nuBrowseTitle').on('touchstart.nuresizecolumn', function(event) {nuDownBrowseResize(event, 'finger_touch');});
$('.nuBrowseTitle').on('touchmove.nuresizecolumn', function(event) {nuDragBrowseColumn(event, 'finger_touch');});
$('.nuBrowseTitle').on('touchend.nuresizecolumn', function(event) {nuEndBrowseResize(event);});
$('.nuBrowseTitle').on('touchcancel.nuresizecolumn',function(event) {nuEndBrowseResize(event);});
}
Code: Select all
function nuDownBrowseResize(e, p){
e.preventDefault();
window.nuBROWSERESIZE.mouse_down = true;
window.nuBROWSERESIZE.pointer = p; // Added
window.nuBROWSERESIZE.moving_element = e.target.id;
window.nuBROWSERESIZE.x_position = e.clientX;
$(e.target).css('background-color', '#badeeb');
}
Code: Select all
function nuDragBrowseColumn(e, p){
e.preventDefault();
if (window.nuBROWSERESIZE.mouse_down && window.nuBROWSERESIZE.moving_element == e.target.id){
window.nuBROWSERESIZE.pointer = p; // added
var id = window.nuBROWSERESIZE.moving_element;
var offset_limit = 100000000;
var min_offset = 2;
var x = e.pageX;
Re: Resizing columns not possible?
Guys,
I have uploaded kev1n's code and it works for me.
Thanks, man!
Steven
I have uploaded kev1n's code and it works for me.
Thanks, man!
Steven