knimeService.allowFullscreen()

Hello,

I have been trying to use the knimeService.allowFullscreen() function to get a toggle fullscreen button on my view. However no button appears on my interactive view and no error appears in the console.
Any ideas of what might be the issue or someone with an example that has used the function successfully?

Thanks,
Nick

Hi Nick,

the fullscreen button will only show up, if the browser supports it. So if you are using the bundled Chromium it should work, in the internal SWT browser it does not. Also if you are developing this for the WebPortal the button should show up.

2 Likes

Hey Albrecht,
I am using Chromium, however it is not working. I want it to show up in the interactive view. Web portal is not my concern at the moment.
Thanks,
Nick

Hi Nick,

I’m not sure why it’s not working then. I guess it’s best if you debug this in your Chromium. You can open the developer tools and add a debugger; statement just before the fullscreen call in your view. Also you can spot error messages being logged to the console this way.
Hope this helps,

Christian

1 Like

Hi guys,

I encountered the same issue as Nick. One thing that I noticed is that when I debug the function knimeService.isInteractivityAvailable() in the console of Chromium, it shows false even if it is a composite view. I would expect it to be different given the documentation:

this will return true if the view is part of a composite view with other views (and able to pub/sub events) or false if the view is a single node view.

Perhaps it us to do with that? I cannot see how to change it though.

Thanks,
Matheus

1 Like

Hi,
in this case it is probably best if you debug the init() method of the knimeService to see why this call later on returns false.
Is it correct that if you have a different regular view part of the component that the fullscreen button is present for that view?

1 Like

Hi @albrecht, thanks for helping out. I found out what was wrong, it was actually in my Javascript code in this case. was replaceing the whole content of the body tag with the content that I wanted to show.

$('body').html(content)

I think this was replacing the code generated for the full screen button. When I replaced for the append, it solved the problem.

$('body').append(content)

Cheers
Matheus

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.