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 7641509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:56:28+00:00 2026-05-31T08:56:28+00:00

I am trying to load multiple images onto a canvas using html5 img tag.

  • 0

I am trying to load multiple images onto a canvas using html5 img tag.
and images are replaceable .eg there are 5 list of images
The images are also draggable
and onclick of a particular images replaces the last uploaded image from the same list,
The problem I’m facing is that when I upload a new element it comes on top of other.
and onclick of the bottom element I want it to move to top and drag.
I tried to used the kineticjs function called move to top but nothing is happening..I also checked the library and it’s fine…
I can’t paste my full code here cause it too big.
Here is the part where I’m trying to add the move to top functionality:

          function drawImageOnLayer(layer, img) {
            var x = stage.width / 2 - 100 ;
            var y = stage.height / 2 - 200 ;
            var width = 200;
            var height = 400;

            var kinecticImg = new Kinetic.Shape(function(){
                var context = this.getContext();
                context.drawImage(img, x, y, width, height);
                // draw invisible detectable path for image
                context.beginPath();
                context.rect(x, y, width, height);
                context.closePath();
            });

            // enable drag and drop
            kinecticImg.draggable(true);

this function is not working

        kinecticImg.on("mousedown", function(){
            this.moveToTop();
           layer.draw();

End

        });
            layer.clear();
            layer.add(kinecticImg);

            layer.draw();

        }
  • 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-05-31T08:56:29+00:00Added an answer on May 31, 2026 at 8:56 am

    Got it..
    had to do
    Layer.moveToTop();
    and it worked like a charm

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

Sidebar

Related Questions

I am trying to load multiple files using HTML5. This is my code I
I am trying to load multiple elements with the same name from XML into
I'm trying to turn Etags off on iis 6 since I'm load ballancing multiple
While trying to load a Bitmap onto a SWFLoader the Event.COMPLETE event is not
I'm trying to load fragments of XHTML markup using jQuery's $.fn.load function, but it
I am using Codeigniter and I am trying to upload multiple files into a
I've seen example of preloading using multiple images, however I dont know how to
I've been trying to load multiple files into a table, so that they would
I'm trying to test a SOCKS proxy that's under load from multiple machines. The
I am using Ruby on Rails and am trying to load a page which

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.