question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gallery::Imagery Layers Split

See original GitHub issue

Hi, A little suggestion: https://pasu.github.io/ExamplesforCesium/examples/examples.html#Visualization-Planet I make this demo Imagery Layers Split, which is similiar with Cesiums’. One day I browsed this demo and found it did not support touch event Here is my modification and I tested it was fine:

document.getElementById(‘slider’).addEventListener(‘mousedown’, mouseDown, false); document.getElementById(‘slider’).addEventListener(‘touchstart’, mouseDown, false); window.addEventListener(‘mouseup’, mouseUp, false); window.addEventListener(‘touchend’, mouseUp, false);

function mouseUp() {
  window.removeEventListener('mousemove', sliderMove, true);
  window.removeEventListener('touchmove', sliderMove, true);
}

function mouseDown(e) {
  var slider = document.getElementById('slider');
  var nPos = e.clientX != undefined?e.clientX:e.changedTouches[0].clientX;
  dragStartX = nPos - slider.offsetLeft;
  window.addEventListener('mousemove', sliderMove, true);
  window.addEventListener('touchmove', sliderMove, true);
}

function sliderMove(e) {
  var slider = document.getElementById('slider');
  var nPos = e.clientX != undefined?e.clientX:e.changedTouches[0].clientX;
  var splitPosition = (nPos - dragStartX) / slider.parentElement.offsetWidth;
  slider.style.left = 100.0 * splitPosition + "%";
  viewer.scene.imagerySplitPosition = splitPosition;
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
emackeycommented, Aug 30, 2017

I think the Sandcastle cleanup could be separate from #5780. Sounds like it should wait for that one to get merged first.

1reaction
pasucommented, Aug 30, 2017

Yes, I registered CLA😄 Now, I am pulling another request #5780 . When I committed this html page, it would cause errors for the CI test, so I had to rollback the code for the Reviewers. And I largely believe there is nothing wrong with my code. So would you like to commit this for me or when cesium close the current request #5780, I promise to commit it later. Either is OK to me. I really hope to make more contributions to this great team. Attachment is Imagery Layers Split.html. Imagery Layers Split.html.txt

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image Split — Krita Manual 5.0.0 documentation
Found under Image ‣ Image Split, the Image Split function allows you to evenly split a document up into several sections. This is...
Read more >
How to Divide Images Into Pieces in Photoshop
Click "Layer" to split off the selected part of the image as a new piece. 5. Repeat this process for other pieces that...
Read more >
Divide my image to layers - Adobe Support Community
Hi, I'm trying to divide a high res image into 100 separate rectangles, then I need each separate rectangle in its own layer...
Read more >
Publish hosted imagery layers—ArcGIS Online Help
One Image—Create one hosted imagery layer from a single image. This option supports all supported raster and image formats, multidimensional raster data, and ......
Read more >
How can I split an image layer based on brightness values?
I would try using a luminousity mask. You may have to go a couple of tries, changing the contrast of the image until...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found