Welcome Guest Search | Active Topics | Sign In | Register

ZoomFactor does nothing Options
Albert
Posted: Monday, January 16, 2017 9:41:38 AM
Rank: Newbie
Groups: Member

Joined: 1/5/2017
Posts: 9
I have changed the ZoomFactor on my WebViews however it has no effect on the actual display.

My program creates multiple WebControl objects with a WebView each and then rotates through them with a timer and visible = true/false.

The code that instantiates these objects is as follows

// Intialize WebControls.
for (int i = 0; i < browserParameters.webPageList.Count; i++)
{
// Instantiate webView
WebView webView = new EO.WebBrowser.WebView();
webView.UnloadDelay = 0;
webView.Url = "";
webView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Borderless_MouseDown);
webView.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Borderless_MouseMove);
webView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Borderless_MouseUp);
webView.ZoomFactor = browserParameters.zoom;
webView.LoadUrl(browserParameters.webPageList[i].address);

// Instantiate webControl
EO.WebBrowser.WinForm.WebControl webControl = new EO.WebBrowser.WinForm.WebControl();
webControl = new EO.WebBrowser.WinForm.WebControl();
webControl.BackColor = System.Drawing.Color.White;
webControl.Dock = System.Windows.Forms.DockStyle.Fill;
webControl.Location = new System.Drawing.Point(0, 0);
webControl.Name = "webControl";
webControl.Size = new System.Drawing.Size(browserParameters.width, browserParameters.height);
webControl.TabIndex = 2;
webControl.Text = "webControl1";
// Add webView to webController.
webControl.WebView = webView;
webControl.MinimumSize = new System.Drawing.Size(20, 20);
webControl.Visible = false;
//Add webControl to webControlList.
webControlList.Add(webControl);
// Add webControl to webControlContainer.
webControlContainer.Controls.Add(webControlList[i]);
}

I have checked the incoming ZoomFactor parameter and it is a double 5 which should change the zoom factor properly. I even tried hard coding 5 or 0.25 however this has no effect on the actual display once the WebView is rendered.
eo_support
Posted: Tuesday, January 17, 2017 4:10:17 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

We have looked into this issue. The root cause is Chromium stores zoom level per Url, not per page. This way if you change zoom level in one tab for one page, the zoom level of another tab that might open the same page will update as well. This causes the zoom level to reset every time the WebView loads a new page. We are changing this to behavior so that in our next build the zoom level will be maintained per WebView as most people would expect. We will reply again as soon as the new build is available.

Thanks!
Albert
Posted: Wednesday, January 18, 2017 10:34:19 AM
Rank: Newbie
Groups: Member

Joined: 1/5/2017
Posts: 9
Thank you for the response.
However I am not changing the URL of a WebView multiple times, I am creating one WebControl with one WebView for each different URL and assigning the same ZoomFactor to all WebViews when they are instantiated. I am then looping though the WebControls (not the WebViews) to create that rotating functionality. Also each WebControl has a WebView with a different URL.
eo_support
Posted: Wednesday, January 18, 2017 10:55:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
We understand. When you just create the WebView, it would initially load an empty Url. Once that Url is loaded, it will proceed to load the actual Url you set through Url property. If you set the ZoomFactor during the "empty Url" stage, then the ZoomFactor will be associated to that empty Url and it will reset when the actual Url is loaded. This obviously introduces a lot of confusion and this will change in our next build so that ZoomFactor stays to the WebView, not the Url.
Albert
Posted: Wednesday, January 18, 2017 11:17:04 AM
Rank: Newbie
Groups: Member

Joined: 1/5/2017
Posts: 9
Alright thanks,

In the meanwhile is there a workaround for this?
eo_support
Posted: Thursday, January 19, 2017 5:05:03 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,067
Hi,

This is just to let you know that we have posted build .39 that should address this issue. In the new build ZoomFactor "sticks" to the WebView even if you navigate to a different Url. Please download it from our download page and let us know how it goes.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.