About design and nearby

Working with Angular: how to fix “Cannot find name ‘require'” issue

Posted: November 15th, 2017 | Author: | Filed under: Development, Tips and Tricks | Tags: , , | No Comments »

Sometimes building an app with Angular 4.. after including file in component and compiling, you can get such type of error:

Cannot find name ‘require’.

I have the following in one of my components:

angular component error issue
Read the rest of this entry »

Share Button

How to animate SVG on scrolling

Posted: October 15th, 2016 | Author: | Filed under: Development, Tips and Tricks | Tags: , , , , , , , | No Comments »

Working with SVG consists of two parts: designing itself and development. They are tired very closely and depend each on another. The nature of SVG as both an image format and a XML format, every step taken in the graphics editor directly affects the resulting code.

There are a lot of ways to animate SVG. It could be done with the tag that goes right into the SVG code, with javascript libraries or using inline SVG code inside HTML) and animating the parts right through CSS. My task was animating SVG on page scrolling and as a base I used “Masking SVG Animations” by Nathan Gordon tutorial.

Final image
I love to work with Adobe Illustrator, so I started with my design firstly. The final image should be:

Creating your *.svg image is the most critical step — if you have problems making it work, probably it’s because your SVG assets weren’t correctly produced.

1. The design stage: drawing vector image.

I decided to draw my picture using ‘path’.
*The ‘path’ element is the most powerful element in the SVG library of basic shapes (lines, curves, arcs, etc.). The shape of a path element is defined by one attribute – ‘d’ (‘d’ stands for data and it could just as well stand for directions.).
There are a number of stroke related properties within SVG that allow us to control the details of strokes, some of them are: stroke, stroke-width, stroke-linecap, stroke-dasharray, stroke-dashoffset.

It’s important to start drawing the path with the right direction – to avoid a headache at the development stage. Well, you can change the direction in the XML code or via styles or javascript.. but for complicated shapes it’s easier to think about the final result while drawing )).
Read the rest of this entry »

Share Button

Responsive Tables for Mobile Devices

Posted: August 14th, 2016 | Author: | Filed under: Development, Mobile Design and Development, Tips and Tricks | Tags: , , , , , , , | No Comments »

You have a great website with responsive design and number of tables which fit the smaller viewports well.. say, like described in my post Responsive Tables. Every table has horizontal scroll for mobile-sized view, without breaking layout. It happens because of CSS settings for the table ‘display:block;’ and ‘overflow-x:auto;’. A user can swipe right and left to horizontal scroll the table to see the content.
A bad news is the user has no indication that they can swipe to the right (the momentum effect) – many mobile browsers don’t show scrollbars at all, while some show them only while scrolling…

The solution is to use

  1.  overflow-x: scroll; /* instead of 'auto' */
  2.  -webkit-overflow-scrolling: touch;

Read the rest of this entry »

Share Button

Javascript and CSS-powered Spinner: spin.js with Overlay

Posted: July 12th, 2016 | Author: | Filed under: Development, Tips and Tricks | Tags: , , , , | No Comments »

The days of using images to provide the visual effects are over. Now we can create gradients, shadows, rounded corners, use animations with styles only. And spinner image is not the exception.

So if I need spinner for my project, I use spin.js by Felix Gnass usually.
javascript-powered spinner It’s highly configurable, resolution independent, uses VML as fallback in old IEs,
uses @keyframe animations, falling back to setTimeout().

Spin.js dynamically creates spinning activity indicators that can be used as resolution-independent replacement for AJAX loading GIFs.

The only thing I missed with this library was an overlay option – to cover the rest of the page and prevent a user from clicking any element while the required content is loading.

I decided to add a ‘div’ which appears while spinner is working and removed after content has been loaded:

  1. <div id="overlay"></div>
  2. <div id="waitSpinner"></div>

Read the rest of this entry »

Share Button

Hoya HD CIR-PL Filter: how I fixed it

Posted: April 29th, 2016 | Author: | Filed under: Tips and Tricks | Tags: , , , , | No Comments »

Photography is my passion. To take great landscape photos, I use polarizing filter (Hoya HD CIR-PL).

Hoya CIR-PL filterIt was the middle of a photoshoot and I was going to rotate my polarizer – and suddenly the front piece fell off but the rear threads were still on my camera. I was surprised a lot!

The fact was I hadn’t saw how it could be (possibly) broken..

After Google search, there really wasn’t much on there. I found that another person it happened to contacted Hoya via e-mail to their site and received this reply:

“The ‘black oily ring’ will need to go around the front ring. Then, squeeze the oily ring into the outside of the front ring while placing the front ring into the rear ring. It should snap into place.
If this doesn’t work, send the filter to THK Photo Products, 7642 Woodwind Drive, Huntington Beach CA 92647, ATTN: Repair Dept. Include a note explaining the problem, along with any and all contact information. .. The repair cost to re-assemble a filter is generally less than the cost of a new filter.”

Read the rest of this entry »

Share Button

Looking for a Freelance UX & UI designer for your project? I’m ready to jump onboard!

Let's discuss your project now