Is the word "pull" used in the same way in the following two sentences?

Iron fillings drawn by the pull of a magnet.

The spaceship came under the pull of the gas giant.
the same meaning