Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8583105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:27:20+00:00 2026-06-11T21:27:20+00:00

I am building an app which should show different types of graphs. One should

  • 0

I am building an app which should show different types of graphs. One should show two or more images positioned by the scores the user did. Okay that has nothing to do with the problem. So I wrote a jQuery plugin which receives values via json to draw the graphs.

The plugin first calls a function which draws the Lines of the graph (working) another function draws the grid behind the graph (also working).

Now the problem: the main part loops over the array of values and adds Kinetic.image objects to a layer wich is returned und added to the stage.:

$.each(this.data, function(key, value) {
            $.each(value, function(secKey, secValue){
                secValue.X = Math.floor((secValue.X - minX) * scaleX) + xOffset;
                secValue.Y = Math.floor(yOffset + ((minY - secValue.Y) * scaleY));
                coords.push(secValue);
            });
        });

        $.each(coords, function(key, value){
            var imageObj = new Image();
            imageObj.src = value.image;
            imageObj.onload = function() {
                var image = new Kinetic.Image({
                    x: value.X,
                    y: value.Y,
                    image: imageObj,
                    width: 180,
                    height: 180
                });

            // add the shape to the layer
            pictures.add(image);

            };
        });

        return Array(pictures, popup);

At the end the the rendered page has 4 canvas objects. And also when I console.log() the stage there are the layers for graph, grid, pictures and popup in it, but whats not shown are the images. The sources of the images are available. Checked this several times.

Does anyone have a hint where the problem could be.?

Thanks in advance.

Matthias

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:27:21+00:00Added an answer on June 11, 2026 at 9:27 pm

    have you confirmed that imageObj.onload is being executed? It’s standard practice to set the source of the imageObj after defining the imageObj onload function due to browser caching.

    Next, you’ll also want to be sure to redraw the layer whenever the images have been loaded with layer.draw(); Recall that KineticJS layers don’t auto redraw whenever things change for performance reasons

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an app which should allow any user to setup and account using
I´m building an asp.net app, which technology I should use to get AJAX capabilities?
I am building an app which requires saving a form whenever user enter the
I'm building a Rails app which creates a bookmarklet file for each user upon
I am using Rails 3, and building an app in which a user can
I'm building an app in Rails 3. I currently have a user model which
I am building an app which should only have a screen with three checkboxes
I'm building an app which consists of different views which are closely related to
I'm currently building a web-app that has one section where the user sees a
I'm building an android app which should perform a GET on my site to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.