Uncaught ReferenceError: ProductMediaManager is not defined easylife switcher magento 1.9.3 - magento-1.9

I have installed easylife switcher in magento. Everything is working fine except the image is not showing correctly. It is zoomed image and I am unable to zoom in or zoom out.
I have selected the option of switch all media section as switch main image is not working at all.
Please help!!

I have found the answer by myself after struggling with the code. There is nothing wrong with easylife switcher. The thing is that according to your theme you have to add code. So for generating thumbnails in my theme bxslider was used. So, I just initialized that along with existing code in JS callback.

Related

following a link and returning back breaks mobile layout with viewport-fit=cover

I am struggling with PWA I made. I have the html meta tag viewport-fit=cover, which make sure that on phones with a pinhole camera or cutout, the app will stretch around it. When the pwa is added to the phones home screen and opened it works, but when I open a link and return to the "app" the whole camera area is a black bar and the content doesn't stretch around it anymore. Does anyone have a clue if there is a way to fix this behaviour?
I have only written one PWA. The whole App was one javascript file with one html page. Stepping through the app, did not change pages as the url remains constant. Therefore the back arrow does nothing on it. You have to code that action yourself.
In this case, something is not getting initialised again.

Google chart : Container is not defined when html changes

I'm getting the error "Container is not defined" after I click on a different page while the api is loading.
I'm sure that my
var chartTwo = new google.visualization.PieChart(document.getElementById('donutchartDue'))
is working because the error doesn't pop up if I just wait on the same page until everything is loaded.
I believe the cause of this error is that my chart div is no longer there when my template changes while api is running in the background (basically html and apis are asynchronous). =(
Anyone got any idea on how to fix this?
Nvm guys, I used if (angular.element('#donutchartId').length) {} to check if the div exist before the charts get drawn and it worked

Windows Phone 8.1 : ToggleSwitch isn't working as expected

I have a Windows Phone 8.1 Application which is being developed from past one year.
Here's how ToggleSwitch is used in the code
<ToggleSwitch IsOn="{Binding IsSplit, Mode=TwoWay}"
IsEnabled="True"
Foreground="{StaticResource PrimaryColor3Brush}"
OffContent="Off"
OnContent="On"/>
ToggleSwitch is used in a few pages. The behavior of the ToggleSwitch is buggy. The ToggleSwitch does not detect either the "drag" event or "click" event when it is done on the vertical slider of the Switch. The following image shows the arrow pointed to the part of the switch where click or drag doesn't get defected.
This is a problem on every ToggleSwitch in this application.
However when I create a fresh Windows Phone 8.1 project and add a ToggleSwitch, it works smooth as expected. So this way I was able to isolate that the problem is happening only on our current project.
So to debug this, I tried the following
I saw if we had any default styles being applied to ToggleSwitches in our app in general that modified the original behavior - No There was None
I created a fresh new page in my current app where I created only a ToggleSwitch within a Grid - No luck, the ToggleSwitch was still buggy.
I used Blend to edit a copy of the default template of the ToggleSwitch, pasted the same onto the ToggleSwitch on my page - Still, the behavior didn't get fixed.
I tried to see if any of the ancestor classes of ToggleSwitch had been applied a default different Style - No, there was none.
I've spent hours on this but I'm not sure what could be causing the ToggleSwitch to act buggy. I would highly appreciate if anyone has any idea of what could be happening or if they could share a few other things that I could try so that it might fix.
Thanks in Advance.

How do I hook paper-tabs and core-animated-pages together?

I've been going over Rob Dudson's I/O talk (at 27:00) and trying to use core-animated-pages with paper-tabs.
When I click the tab, I would like some respective content to be shown, with the animation.
I tried to follow Rob's approach of using the designer, but somehow I do not get the 'selected' property in the properties panel.
The polymer docs cover tabs and animated-pages separately, so I don't know how I can get them to work together.
Can someone point me in the right direction?
There is a bug in the currently deployed designer tool that prevents certain bindable attributes from being displayed in the properties pane. It has been fixed in master, so the next time the Polymer team deploys the tool, it should fix your problem.
In the meantime, you could install the tool using bower install Polymer/designer#master to get the fixed version locally.
core-animated-pages works with div tags. Then just add addEventListener to select the page.
Here is a working example (jsfiddle): Click here.

Gmaps4rails map showing broken controls

I followed the apneadiving / Google-Maps-for-Rails instructions to add a Google Map to my Rails 4 Bootstrap project. I first created an empty scaffold project just like in the tutorial video and everything worked great. Then I added a Google Map to my Bootstrap project and the controls on the map are rendered incorrectly. I can still zoom in and out but I have to guess where to click as the zoom controls are all messed up and in an incorrect place.
Also, I noticed every time I refresh the page the marker shows up in a slightly different place (by a few houses - sometimes on the next street over).
For the css issue, its due to bootstrap, check the wiki: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Twitter-bootstrap-%26-Foundation
For the jumping markers, use version 2.1.2