Draging outside the canvas
21 February 2017 09:54
Hello,
In the case when the canvas doesn't occupy the entier page, when you click inside the canvas and drag inside the canvas, you can interact with the 3D objects. However, as soon as the mouse is outside the canvas, the interaction stops. I think this is no very good for UX.
Is it possible to continue the interaction when the mouse is outside of the canvas? How can I do it?
BTW, B4W is really a nice piece of software, made with care. Congrats! You guys rock!
In the case when the canvas doesn't occupy the entier page, when you click inside the canvas and drag inside the canvas, you can interact with the 3D objects. However, as soon as the mouse is outside the canvas, the interaction stops. I think this is no very good for UX.
Is it possible to continue the interaction when the mouse is outside of the canvas? How can I do it?
BTW, B4W is really a nice piece of software, made with care. Congrats! You guys rock!
21 February 2017 16:00
Thank you, but somehow it's not making it for me. I'm probably making something wrong.
In the function load_cb(data_id) {} I added the whole function as: (after "// place your code here")
function load_cb(data_id) {
m_app.enable_camera_controls({
disable_default_pivot: false,
disable_letter_controls: false,
disable_zoom: false,
element: "main_canvas_container", // div container id
allow_element_exit: true
});
}
I also added m_app.enable_camera_controls({ allow_element_exit : true }) below the var m_app = require("app"); but at best I can't keep rotating the object once outside the canvas, at worst, it disables all interaction.
I would really appreciate a helpful hand.
In the function load_cb(data_id) {} I added the whole function as: (after "// place your code here")
function load_cb(data_id) {
m_app.enable_camera_controls({
disable_default_pivot: false,
disable_letter_controls: false,
disable_zoom: false,
element: "main_canvas_container", // div container id
allow_element_exit: true
});
}
I also added m_app.enable_camera_controls({ allow_element_exit : true }) below the var m_app = require("app"); but at best I can't keep rotating the object once outside the canvas, at worst, it disables all interaction.
I would really appreciate a helpful hand.
22 February 2017 13:43
22 February 2017 14:09