Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
malik khalf.
portlet html5 canvas problem
December 2, 2011 8:44 AM
Answer

malik khalf.

Rank: Junior Member

Posts: 51

Join Date: September 23, 2011

Recent Posts

Hi,
I'm trying to develop a portlet using a javascript library to get this diplayed through a portlet. The problem is that it is displayed but very small and i can't see nearly nothing.

Have you any idea??
Tomas Polesovsky
RE: portlet html5 canvas problem
December 2, 2011 2:04 PM
Answer

Tomas Polesovsky

LIFERAY STAFF

Rank: Liferay Master

Posts: 643

Join Date: February 13, 2009

Recent Posts

Hi,

I see that there is no canvas tag defined in the this emoticon , so the JS generates it dynamicaly and somehow recalculate the canvas width and height. Have you tried to define width & height for the container that owns the canvas?

-- tom
malik khalf.
RE: portlet html5 canvas problem
December 3, 2011 1:56 AM
Answer

malik khalf.

Rank: Junior Member

Posts: 51

Join Date: September 23, 2011

Recent Posts

Thank you Tomas. Maybe yes, there is no canvas. Nevertheless, I debbuged the code with firebug and I've seen a canvas in the html source :mellow, anyway it was friday night and l was a little bit tired. I will try your proposition on monday and give feed back.
malik khalf.
RE: portlet html5 canvas problem
December 4, 2011 10:57 PM
Answer

malik khalf.

Rank: Junior Member

Posts: 51

Join Date: September 23, 2011

Recent Posts

In fact I forgot to inculde the CSS files emoticon However, there are other problems:

1) The protlet doesn't fit the image i.e. the protlet is still small and the image overflows the protlet
2) The image doesn't answer to my clicks, as in this

I'm not an expert in javascript and css, can you help me??
Tomas Polesovsky
RE: portlet html5 canvas problem
December 12, 2011 10:41 AM
Answer

Tomas Polesovsky

LIFERAY STAFF

Rank: Liferay Master

Posts: 643

Join Date: February 13, 2009

Recent Posts

ad 1, AFAIK there is no rule how you could tell Liferay how big portlet should be and where it fits and where doesn't. You need to setup correctly width & height of the surrounding div element.
ad 2, I can try to help you, but as you see - I have quite long response time emoticon If you want to continue, try to attach your portlet, I try to look where's the problem

-- tom