3
  1. I was solving one of the issues from the other stack exchange question.
  2. The fotorama library file which is located in lib/web/fotorama/fotorama.js has one method navUpdate(){...} at 2765 line. I want to override the function with additional logic.
  3. I can achieve that in two ways. One is taking the whole file to the theme app/design/frontend/{vendor_name}/{theme_name}/web/fotorama or on the second choice can write the mapping for the whole file using requirejs-config.js.
  4. In an above-mentioned way, I have to copy and rewrite the whole file (around 3800+ lines) again just to add few lines in that which seems not right. I tried to achieve it via mixin but it doesn't seem to be possible.

Question: Is mixin possible to override the navUpdate(){...} method from lib/web/fotorama/fotorama.js? or is there any other approach in which not to rewrite the whole file again to avoid boilerplate?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.